C
carlosremelios
My code is below. It works fine, moving from textframe to textframe
and asks the user about making changes to the text in the textframe
BUT the cursor and or screen doesn't move to the next location, it
just stays on page one. Screen update, maybe?
Sub fixTextBoxes()
Dim s As Shape
For Each s In ActiveDocument.Shapes
With s.TextFrame
If .HasText Then s.Select
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to Remove strikethrough and change font
color to black?" ' Define message.
Style = vbYesNoCancel + vbCritical + vbDefaultButton2 '
Define buttons.
Title = "MsgBox Demonstration" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes
Selection.Font.Color = wdColorBlack
Selection.Font.StrikeThrough = False
If Response = vbCancel Then Exit Sub
Else ' User chose No.
MyString = "No" ' Perform some action.
End If
End With
Next
End Sub
and asks the user about making changes to the text in the textframe
BUT the cursor and or screen doesn't move to the next location, it
just stays on page one. Screen update, maybe?
Sub fixTextBoxes()
Dim s As Shape
For Each s In ActiveDocument.Shapes
With s.TextFrame
If .HasText Then s.Select
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to Remove strikethrough and change font
color to black?" ' Define message.
Style = vbYesNoCancel + vbCritical + vbDefaultButton2 '
Define buttons.
Title = "MsgBox Demonstration" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes
Selection.Font.Color = wdColorBlack
Selection.Font.StrikeThrough = False
If Response = vbCancel Then Exit Sub
Else ' User chose No.
MyString = "No" ' Perform some action.
End If
End With
Next
End Sub