Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / June 2006

Tip: Looking for answers? Try searching our database.

MS Word merging data into a single document from Database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mikeb2good@gmail.com - 21 Jun 2006 00:47 GMT
I'm a Newb at this.  Here's my problem:  I need a way to put data from
a single row of information from a SQL server database into a single
page of a Word Document.  This data is selective (i.e., the information
doesn't go into a table).  Moreover, I need to dynamically link with
the database to print out these single word docs one at a time, as
needed.  For instance:
say I have product no. 234 and I need to insert a picture of it (it's
in the database as a name already), insert the production time say, and
also list a description of the object, and other like information, tell
who the suppliers of the raw materials are, what shape the product is ,
etc.
But then someone needs product 8777-23-0A, in a rush (with the same or
different information).  So I need to be able to type in the product
no. (in Word, I hope) access the database, merge the answer into the
Word document, and print out the result in a jiffy.

I need it nicely formatted in Word (already done), and I need to access
this data and print it out whenever someone needs the information.  I
don't have MS Access, but I do have Excel.  So, if there is a way where
I could do this from Excel, it would be acceptable.  I guess I could
always update the excel query every time a product is added.  But keep
in mind that the excel spreadsheet for this query is already in the 3
Meg range.

I'm just trying to save myself the headache of copy, paste, copy paste,
format, format, copy, paste, format, routine.

As for Visual Basic for Word, I have had no prior experience with it. I
am familiar with Perl, though.  So the ideas of a scripting language
are familiar to me.

I am not even sure this is possible in Word.  I'm not sure if merge can
return a single unique identifier and their adjacent columns without
wanting to merge the data from all of the records.

Anyone have an ideas?
Doug Robbins - Word MVP - 21 Jun 2006 04:45 GMT
You could use a userform on which you have a list box that you load with the
data from Excel using the information in the article:

"Load a ListBox from a Named Range in Excel using DAO" at:

http://www.word.mvps.org/FAQs/InterDev/FillListBoxFromXLDAO.htm

and then select the item in the list box and transfer the data from the item
into the Word document

Also see:

"How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

and

"How to find out which Items are selected in a Multi-Select ListBox" at:

http://www.word.mvps.org/FAQs/Userforms/GetMultiSelectValues.htm

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> I'm a Newb at this.  Here's my problem:  I need a way to put data from
> a single row of information from a SQL server database into a single
[quoted text clipped - 32 lines]
>
> Anyone have an ideas?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.