Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i goto a bootmark in a word doc from vbscript and replace..?

Status
Not open for further replies.

diembi

Programmer
Sep 22, 2001
238
ES
Hello people!!!

How can i goto a bootmark in a word doc from vbscript and replace it with "hello"?

Thanks!!!
 
The answer is the next code:
(This code replace the text in pacicodi marc with the text "hello")
...
...
Set oSelection = oWD.Selection

oSelection.Range.Start = 0
oSelection.Range.End = 0

campo = "pacicodi"

oSelection.GoTo -1,,, "pacicodi"
oSelection.Select()
oSelection.TypeText("hello")
...
...

Bye!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top