>Hi all,
>
>I am going to be generating letters, in MS-WOrd, using templates (maintained by the user) and bookmarks to fill in information from data, after a benefit check printing run. Anywhere from 10 - 150 letters might be printed.
>
>Many letters include the same information (date, amount of check). But additional information differs, depending on the type of benefit...there may be an applicant name and address, wage earner name and address, beneficiary name and address, etc.
>
>At first i thought i'd set up a table, w/an entry for each type of bookmark and specify which letters each bookmark should be contained in. But maybe that is overkill.
>
>Now i'm wondering if, when generating the letters, i should just check to see if the bookmark exists in the template, and if so, fill in the appropriate information. My concern is speed. There will be at least 22 bookmarks to check for, but probably only an average of 7 will apply in any one letter.
>
>Does anyone have a feel if checking for the existance of a bookmark is a sloooow thing to do? I have code that checks for the bookmark as follows:
>
>
IF oAppInfo.oWord.Documents[1].Bookmarks.EXISTS( m.lcBookmarkName )
>
>Thanks for any input....J
Jill,
10-150 letters and around 22 bookmarks I think you have nothing to worry about bookmarks performance wise (and further given that they would be printed, printing is always slower then code generating these - at least with today's hardware). If you're comfortable with bookmarks approach then go with it.
"...in MS-WOrd, using templates (maintained by the user) and bookmarks to fill in information from data...".
What if instead of bookmarks they insert mergefields or behind the scenes you create new templates replacing bookmarks with mergefields? Templates are much less than the printout count. If that sounds viable to you then you'd simply create CSV file as source to print and do a mailmerge. (but since your volume is very low might not worth the time to change your code).
Cetin