Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation -- Bookmarks vs. MailMergeFields
Message
From
02/09/1998 18:04:22
 
 
To
02/09/1998 16:38:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00131232
Message ID:
00132578
Views:
31
>I didn't pursue bookmarks at all, so I can't offer you anything there. As for fields, I use a template file to create the document for the user. I initialize the document when I first create it. So, unless a user messes with a template...I won't really have any problems with them deleting fields. If they do start messing with the templates, I'll discuss passwording the .DOT files. Personally, I'd be thrilled if they got that adventurous < g >.
>
>I liked fields because I didn't have to navigate to the bookmark before inserting my text. But, it does take some time to set up the fields. Oh, I just add them by picking the field control from the controls toolbar in Word.
>
>I hope this helps. OLE automation _is_ rough. I think there's still a job for us programmers < s >.

Nancy, the part that is confusing me is the data source. When you use mail merge fields did you have to define some data source? Or is there some way to assign values directly from VFP similar to the way a bookmark is handled.

Here are my design goals:

1) Users can create many different form letters without talking to me.

2) Users can refer to many different data fields from a set that I make available. Not just Name and address but resort name, unit, reservation dates, etc.

3) From the reservation program, users can select the proper form letter from a pop-up list and push a button to write the letter and send it to a network printer.

4) The user should not experience any noticeable delay after issuing pushing the print button.

I already have this system running in DataFlex so I'm trying to duplicate it in the best way possible in VFP/Word 97.

Here is what I'm about to do:

1) Create a standard data table (MASSDATA.DBF) that contains fields for all the data that the user might need.

2) Put a dummy copy of this table in each users \My documents directory.

3) Give the users a few standard form letters set for mail merge with this table set as the data source. They can make copies of these to create new letters and insert additional "merge fields" as they desire.

4) When the user picks the form letter document name from the VFP reservation system, I will select their copy of the MASSDATA table and fill the fields with the data for the current reservation.

5) I will then issue the proper VBA calls to Word to merge the data and print the letter. I expect that Word will not be visible.

6) I will make MASSDATA.DBF a Fox2X table and try to link it directly to Mail Marge without using ODBC. (Fuzzy on how to do this.)

If you or Tim know of a better approach, please advise.
Peter Robinson ** Rodes Design ** Virginia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform