C
constance
Hi everybody,
I have a word document that contains protected sections. I need to do a
search on this document using those command lines below :
Dim MyValue
MyValue = "Formation :"
Selection.HomeKey Unit:=wdStory
With ActiveDocument.Content.Find
..ClearFormatting
Counter = 0
Do While .Execute(FindText:=MyValue, Forward:=True) = True
Counter = Counter + 1
Loop
End With
If Counter >= 1 Then
Response = MsgBox("Error.", vbOKOnly, "Error")
Exit Sub
End If
but it doesn't seem to work on a protected document
what can I do
maybe I need to un protect my sections but the first time I execute my
mecro they don't exist so I will have an error
can somebody help me please ?
Maybe I can only do a search on one section ?????
Thanx for all your help
Lyne
I have a word document that contains protected sections. I need to do a
search on this document using those command lines below :
Dim MyValue
MyValue = "Formation :"
Selection.HomeKey Unit:=wdStory
With ActiveDocument.Content.Find
..ClearFormatting
Counter = 0
Do While .Execute(FindText:=MyValue, Forward:=True) = True
Counter = Counter + 1
Loop
End With
If Counter >= 1 Then
Response = MsgBox("Error.", vbOKOnly, "Error")
Exit Sub
End If
but it doesn't seem to work on a protected document
what can I do
maybe I need to un protect my sections but the first time I execute my
mecro they don't exist so I will have an error
can somebody help me please ?
Maybe I can only do a search on one section ?????
Thanx for all your help
Lyne