P
Pat-O-Spark
Hi,
I'm trying to insert text (usually the same text) at several places in a
document. I've bookmarked these places but can't get the right syntax.
Here's a snippet of the code I've written to try to put the employee's name
in the middle of a sentence (where the bookmark Emp6 exists):
Sub EmpNme()
Dim PloyNme As String
Dim bmRange As Range
Set bmRange = ActiveDocument.Bookmarks("Emp6")
PloyNme = InputBox("Please enter name of Employee",, , 10000, 7000)
bmRange.InsertAfter (PloyNme)
Selection.GoTo What:=wdGoToBookmark, Name:="Emp6"
End Sub
Thanks in Advance
I'm trying to insert text (usually the same text) at several places in a
document. I've bookmarked these places but can't get the right syntax.
Here's a snippet of the code I've written to try to put the employee's name
in the middle of a sentence (where the bookmark Emp6 exists):
Sub EmpNme()
Dim PloyNme As String
Dim bmRange As Range
Set bmRange = ActiveDocument.Bookmarks("Emp6")
PloyNme = InputBox("Please enter name of Employee",, , 10000, 7000)
bmRange.InsertAfter (PloyNme)
Selection.GoTo What:=wdGoToBookmark, Name:="Emp6"
End Sub
Thanks in Advance