Dragon71
03-18-2009, 12:53 PM
Chasing code that will clear only selected bookmarks in Word
Have tried =Null and .Bookmarks("Client").Range.Text = "",but neither seem to work
Bookmarks entered using below
Private Sub cmdOK_Click()
With ActiveDocument
.Bookmarks("Job 1").Range.Text = ListBox1.Value
.Bookmarks("Job 2").Range.Text = TextBox1.Value
.Bookmarks("Job 3").Range.Text = ListBox3.Value
.Bookmarks("Job 4").Range.Text = ListBox4.Value
.Bookmarks("Job 5").Range.Text = ListBox5.Value
.Bookmarks("Job 6").Range.Text = ListBox6.Value
.Bookmarks("Job 7").Range.Text = ListBox7.Value
.Bookmarks("Job 8").Range.Text = ListBox8.Value
.Bookmarks("Job 9").Range.Text = TextBox2.Value
.Bookmarks("inspectiondate").Range.Text = TextBox3.Value
.Bookmarks("pulleynumber").Range.Text = TextBox4.Value
End With
End Sub
There is another post on here regarding this subject from Nick,but i could not work out the answer from the responses
Please help
Only want to clear specific bookmarks,not all on the whole page
:banghead:
Thanks
Have tried =Null and .Bookmarks("Client").Range.Text = "",but neither seem to work
Bookmarks entered using below
Private Sub cmdOK_Click()
With ActiveDocument
.Bookmarks("Job 1").Range.Text = ListBox1.Value
.Bookmarks("Job 2").Range.Text = TextBox1.Value
.Bookmarks("Job 3").Range.Text = ListBox3.Value
.Bookmarks("Job 4").Range.Text = ListBox4.Value
.Bookmarks("Job 5").Range.Text = ListBox5.Value
.Bookmarks("Job 6").Range.Text = ListBox6.Value
.Bookmarks("Job 7").Range.Text = ListBox7.Value
.Bookmarks("Job 8").Range.Text = ListBox8.Value
.Bookmarks("Job 9").Range.Text = TextBox2.Value
.Bookmarks("inspectiondate").Range.Text = TextBox3.Value
.Bookmarks("pulleynumber").Range.Text = TextBox4.Value
End With
End Sub
There is another post on here regarding this subject from Nick,but i could not work out the answer from the responses
Please help
Only want to clear specific bookmarks,not all on the whole page
:banghead:
Thanks