place value of bookmark in footer

E

erik

hello!

i wrote the following lines to put the value of a bookmark in the footer of
the document.

Sub voettekst()

Dim vttkst As Range
Set vttkst = Bookmarks("actie1").Range

ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text = vttkst



End Sub

But the output of this is: FORMTEXT IN02021 (where is IN02021 the value of
the bookmark). I don't want to see 'FORMTEXT'.

Does anybody know how to use this program without getting FORMTEXT in the
output?

thnx!
erik
 
J

Jezebel

ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Text =
mid$(vttkst,10)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top