Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed in checking for MS-Word Bookmarks
Message
De
11/10/2006 06:24:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/10/2006 21:18:34
Jill Derickson
Software Specialties
Saipan, CNMI
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01161078
Message ID:
01161130
Vues:
16
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform