D
Designingsally
hi i dont knw why i m encoutering this error. I dont even know if its only me
who is facing this error. this macro highlights - and then it changes the
letter preceding - to lower case. This has been discussed previosly in this
forum. It was working fine till few days back. Now i m facing some new
problem, which has put me in a dilemma. pls guide me thru this. I dont y i m
facing this problem
sample data
Demonstration Screen – Format 1
Demonstration Screen – Format 2
Practice Screen – Format 1 Quiz Screens
Match the Following - Text
Match the Following - Graphics
Sequencing - Text
Sequencing - Graphics
Fill in the Blank
True or False
Hot Spot
Multiple Choice Question - Text (Single Select / Multiple Select)
Multiple Choice Question - Graphics (Single Select / Multiple Select)
Well.. demonstration screen is not highlighted which is correct so is
sequencing which is correct again. but multiple choice question is match the
following is been
highlighted why, they shd not be highlighted.
the macro i have used is
Private Sub Hyphn()
Dim orng As Range
Dim preRng As Range
Dim sCase As String
Set myRange = ActiveDocument.Range
With Selection
..HomeKey wdStory
With .FInd
..ClearFormatting
..Replacement.ClearFormatting
Do While .Execute("- [A-Z]", MatchWildcards:=True)
Set orng = Selection.Range
orng.Start = orng.End - 1
orng.Select
Set preRng = Selection.Range
preRng.MoveStart wdWord, -3
'MsgBox preRng.Text
If InStr(1, preRng.Text, "Demonstration Screen – ") = False Then
If InStr(1, preRng.Text, "Sequencing - ") = False Then
If InStr(1, preRng.Text, "Multiple Choice Question - ") = False Then
If InStr(1, preRng.Text, "Match Choice Question -") = False Then
If InStr(1, preRng.Text, "Practice Screen - ") = False Then
If InStr(1, preRng.Text, "Match the Following - ") = False Then
sCase = Msgbox("Word after colon should be in lower case.Change?",
vbYesNoCancel, "Change Case")
If sCase = vbCancel Then
Exit Sub
End If
If sCase = vbYes Then orng.Case = wdLowerCase
End If
End If
End If
End If
End If
End If
Selection.Collapse wdCollapseEnd
Loop
End With
End With
End Sub
who is facing this error. this macro highlights - and then it changes the
letter preceding - to lower case. This has been discussed previosly in this
forum. It was working fine till few days back. Now i m facing some new
problem, which has put me in a dilemma. pls guide me thru this. I dont y i m
facing this problem
sample data
Demonstration Screen – Format 1
Demonstration Screen – Format 2
Practice Screen – Format 1 Quiz Screens
Match the Following - Text
Match the Following - Graphics
Sequencing - Text
Sequencing - Graphics
Fill in the Blank
True or False
Hot Spot
Multiple Choice Question - Text (Single Select / Multiple Select)
Multiple Choice Question - Graphics (Single Select / Multiple Select)
Well.. demonstration screen is not highlighted which is correct so is
sequencing which is correct again. but multiple choice question is match the
following is been
highlighted why, they shd not be highlighted.
the macro i have used is
Private Sub Hyphn()
Dim orng As Range
Dim preRng As Range
Dim sCase As String
Set myRange = ActiveDocument.Range
With Selection
..HomeKey wdStory
With .FInd
..ClearFormatting
..Replacement.ClearFormatting
Do While .Execute("- [A-Z]", MatchWildcards:=True)
Set orng = Selection.Range
orng.Start = orng.End - 1
orng.Select
Set preRng = Selection.Range
preRng.MoveStart wdWord, -3
'MsgBox preRng.Text
If InStr(1, preRng.Text, "Demonstration Screen – ") = False Then
If InStr(1, preRng.Text, "Sequencing - ") = False Then
If InStr(1, preRng.Text, "Multiple Choice Question - ") = False Then
If InStr(1, preRng.Text, "Match Choice Question -") = False Then
If InStr(1, preRng.Text, "Practice Screen - ") = False Then
If InStr(1, preRng.Text, "Match the Following - ") = False Then
sCase = Msgbox("Word after colon should be in lower case.Change?",
vbYesNoCancel, "Change Case")
If sCase = vbCancel Then
Exit Sub
End If
If sCase = vbYes Then orng.Case = wdLowerCase
End If
End If
End If
End If
End If
End If
Selection.Collapse wdCollapseEnd
Loop
End With
End With
End Sub