retrieve bookmark

G

Gina

Hi all.

hope that I am in the right group here with my problem !

I am trying to get some text to be written to a certain position. Therefore
I create a bookmark and would like the text to be put there.
but all it
does is to delete a command button I created on the document itself and to
write the text below exactly there
__________________________________________
Dim myRange

Set myRange = ActiveDocument.Content
myRange.Collapse Direction:=wdCollapseStart

If myRange.BookmarkID = 0 Then
ActiveDocument.Bookmarks.Add Name:="temp", Range:=myRange
End If

Selection.TypeText Text:="hallo macro1"
Selection.TypeParagraph
__________________________________________

could anyone please show me some syntax to do that

Thanks in advance

Gina
 

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