Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 27th, 2005, 01:18 PM
Authorized User
Join Date: Oct 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inserting a picture from a database into Word

I have a picture stored in an Access database, it is not stored on the hard drive anywhere, it is only in the database. I use the Word object to create a Word document in VB6 and I need to be able to insert the picture that is in the database into the Word document as I am building it in code. Can anyone help with this? Thanks.
Old February 15th, 2005, 07:02 PM
Friend of Wrox
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

2 ways I would try to approach this:

1) Put the picture from the db onto the clipboard, then use Word's ability to paste to add the picture.
(Might make users really mad to have their clipboard manipulated though. It would make me mad...)

2) Write the picture out to a file, then use word's ability to insert the contents of a file into a document.

Doing this directly seems kind of hard; Word doesn't really give you direct access to the .doc, so as to be able to directly add the picture.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Selecting a picture in MS Word VBA zainhansrod VB How-To 1 January 2nd, 2007 03:39 AM
Inserting picture into Sqlserver using JSp Thushara Jacob Pulickal Pro JSP 0 May 4th, 2006 12:42 AM
Inserting Word Documents into Access showie Access VBA 4 December 14th, 2005 02:02 PM
inserting picture p_gauri7 Crystal Reports 1 February 21st, 2005 07:25 AM
saving picture from word to other folder DorisTan VB How-To 0 December 3rd, 2004 02:46 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.