S
Sean
I am trying to reasign a bookmark to a user inputed
item. I am having problems at the
Add Range:=strConName line. I just need to reassign this
bookmark to the string entered in strConName.
Code is below.
Thanks.
Sean
**********************
Sub ConsultantName()
Dim strConName As String
strConName = InputBox(prompt:="Enter Consultant's Last
Name", Title:="Consultant Name")
If strConName = "" Then
Exit Sub
End If
ActiveDocument.Bookmarks("ConsultantName").Range.Text =
strConName
With ActiveDocument.Bookmarks
.Add Range:=strConName, Name:="ConsultantName"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
End Sub
item. I am having problems at the
Add Range:=strConName line. I just need to reassign this
bookmark to the string entered in strConName.
Code is below.
Thanks.
Sean
**********************
Sub ConsultantName()
Dim strConName As String
strConName = InputBox(prompt:="Enter Consultant's Last
Name", Title:="Consultant Name")
If strConName = "" Then
Exit Sub
End If
ActiveDocument.Bookmarks("ConsultantName").Range.Text =
strConName
With ActiveDocument.Bookmarks
.Add Range:=strConName, Name:="ConsultantName"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
End Sub