Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi,
I have an application which needs to communicate with MS Word to generate documents. Typically my application will want to generate 1 document at a time. The user will select a template name and then choose to build a document. My application then has the responsibility of populating the document with values. I have created document templates in MS Word which contain form fields. I have given my fields bookmark names. I am using COM automation to communicate with Word and I am using WordBasic interface to call the functions I need performed. I can start Word and give it a template to open. I then ask it for all the bookmark names. I then cycle through each bookmark and populate it via doing a 'GoTo' bookmark followed by an 'Insert'. It all seems to be working. Questions 1) what about using mail merge fields. Can I achieve the same thing using a mail merge ? Is it any easier ? Do I need to build a data source file containing all my data and then do a mail merge ? 2) the WordBasic interface is now old technology. What is a more modern approach to achieving my requirements ? 3) In general what is the best approach to having my application generate Word documents for my users ? Thanks |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Mailmerge would almost certainly be easier. Formfields are not meant to be
used the way you are using them. You could use regular bookmarks as easily without the formfields. I regularly produce mailmerges with just one record being used. You would build a data source, which can hold multiple records. So long as you build it with each record having a unique identifier, you should be able to automate inserting a particular record fairly easily. (Says one who has not done this!) http://word.mvps.org/FAQs/MailMerge/...AMailMerge.htm http://word.mvps.org/FAQs/MailMerge/...DataSource.htm Much more at http://word.mvps.org/FAQs/Mailmerge.htm and http://addbalance.com/word/wordwebre....htm#mailmerge -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. wrote in message oups.com... Hi, I have an application which needs to communicate with MS Word to generate documents. Typically my application will want to generate 1 document at a time. The user will select a template name and then choose to build a document. My application then has the responsibility of populating the document with values. I have created document templates in MS Word which contain form fields. I have given my fields bookmark names. I am using COM automation to communicate with Word and I am using WordBasic interface to call the functions I need performed. I can start Word and give it a template to open. I then ask it for all the bookmark names. I then cycle through each bookmark and populate it via doing a 'GoTo' bookmark followed by an 'Insert'. It all seems to be working. Questions 1) what about using mail merge fields. Can I achieve the same thing using a mail merge ? Is it any easier ? Do I need to build a data source file containing all my data and then do a mail merge ? 2) the WordBasic interface is now old technology. What is a more modern approach to achieving my requirements ? 3) In general what is the best approach to having my application generate Word documents for my users ? Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mail merge - use specific fields in the contacts folder to customi | Mailmerge | |||
How to use mail merge to send out a form with blank text fields? | Mailmerge | |||
How can I protect a form and still have mail merge? | Mailmerge | |||
Empty Mail Merge Fields | Microsoft Word Help | |||
Empty Mail Merge Fields | Microsoft Word Help |