Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Bookmarks
Message
De
07/11/2000 12:31:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/11/2000 18:47:24
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00438630
Message ID:
00438863
Vues:
14
>If I have a listbox of Word templates and the user selects one. There may be anywhere from 1 to 30 bookmarks. I know that I can use the Bookmarks() collection to step through each bookmark in the document. What is the best algrothim to see if a match is there with one of my field names?
>
>loDoc = oWord.Documents.open(lcFullPathDocument)
>lnBookmarkCount = loDoc.Bookmarks.count
>
>** Use a for loop to flip through them all.
>for lnI = 1 to lnBookmarkCount
> lcBookMarkname = oDoc.bookmarks[lnI].name
> lcNewValue = FindName(lcBookMarkname)
> oDoc.Bookmarks[lnI].range.text = lcNewValue
>endfor
>
>What would be a good method to find the names?
>
>Thanks
with oWord.ActiveDocument
if .Bookmarks.Exists(cBookmarkName)
   .Bookmarks(cBookmarkName).Range.Text = 'blahblah'
endif
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform