Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
 
Posts: n/a
Default MS Word merging data into a single document from Database

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?

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default MS Word merging data into a single document from Database

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/InterD...xFromXLDAO.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/Userfo...lectValues.htm


--
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

wrote in message
oups.com...
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?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reveal codes in a word document FUN101 Microsoft Word Help 4 May 16th 23 08:47 PM
Mail Merge Data Question Tom Bean Mailmerge 7 May 26th 06 12:02 AM
hard space between words. Sandy L Microsoft Word Help 7 May 5th 06 08:25 PM
How to reformat a complete document. wanda Microsoft Word Help 16 February 11th 06 11:43 PM
multiple docs, one data source kp Mailmerge 12 January 31st 05 04:41 PM


All times are GMT +1. The time now is 05:05 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"