Simpatie.ro - matrimoniale
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
deea43
Femeie
24 ani
Timis
cauta Barbat
25 - 56 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[WORD] VBA to Programatically Change the Text of a Bookmark

Pagini: 1 Moderat de TRaP, TonyTzu
#1
Mrrrr
AdMiN
Postari: 2390


    Dim bkm As Bookmark
    Dim bkmName As String
    Dim bkmRng As Range
    Dim NewText As String

    NewText = "Some Punter"

    For Each bkm In ActiveDocument.Bookmarks
        Set bkmRng = bkm.Range
        bkmName = bkm.Name
        bkm.Range.Text = NewText
        bkmRng.End = bkmRng.Start + Len(NewText)
        Bookmarks.Add Name:=bkmName, Range:=bkmRng
    Next bkm


Source:
https://stackoverflow.com/questions/284 ... d-bookmark


_______________________________________


 
   
Pagini: 1  
Mergi la