G
G.O.Varney
I have the follow VB script
ActiveDocument.Bookmarks.Add("PPT").Select
If rbInstructor.Value Then
Selection.Text = "I"
Else
Selection.Text = "S"
End If
Selection.WholeStory
Selection.Fields.Update
Selection.HomeKey Unit:=wdStory
That creates a bookmark called PPT and then sets it value to either I or S.
In my word document I have create by Cntl-F9 the following
{IF PPT ="I" "0A80" "ABCD"}
When the VB script sets the bookmark to I it should Display 0A80 and
anything else should get ABCD
But this is not happening I always get ABCD
This is my first attempt at controlling text via VB and it hasn't worked.
What have I done wrong ? Have I got the concept right ?
ActiveDocument.Bookmarks.Add("PPT").Select
If rbInstructor.Value Then
Selection.Text = "I"
Else
Selection.Text = "S"
End If
Selection.WholeStory
Selection.Fields.Update
Selection.HomeKey Unit:=wdStory
That creates a bookmark called PPT and then sets it value to either I or S.
In my word document I have create by Cntl-F9 the following
{IF PPT ="I" "0A80" "ABCD"}
When the VB script sets the bookmark to I it should Display 0A80 and
anything else should get ABCD
But this is not happening I always get ABCD
This is my first attempt at controlling text via VB and it hasn't worked.
What have I done wrong ? Have I got the concept right ?