I can't see actual replacement in your macro. Did you paste everything?
Anyway, you have to use Range object instead of Selection, for example:
Code:
|
Set Range001 = ActiveWindow.Selection.Range
With Range001.Find
.Text = "bel bel ble"
... See moreI can't see actual replacement in your macro. Did you paste everything?
Anyway, you have to use Range object instead of Selection, for example:
Code:
|
Set Range001 = ActiveWindow.Selection.Range
With Range001.Find
.Text = "bel bel ble"
.Replacement.Text = "tra la la"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchWildcards = True
.MatchFuzzy = False
End With
Range001.Find.Execute Replace:=wdReplaceAll
|
|
Radek ▲ Collapse |
|
Thanks for your reply. When sending the code, part of it got deleted, i dont know why. I will try again here:
Sub RestoreSource() + Selection.HomeKey Unit:=wdStory + With ActiveWindow + With .View + .ShowHiddenText = True + End With + End With + Selection.Find.ClearFormatting + Selection.Find.Replacement.ClearFormatting + With Selection.Find +
.Text = "(\{\0\>)(*)(\)(*)(\ | | |
seems like I can only use so many characters in my reply. Anyway, should you be willing to help me, I can send you the macro (about 15 lines) to look at. | |
|
|
Not a problem! Just send it to me somehow.
Radek | | |
ok, here is my address | Feb 11, 2009 |
p r e kl a d @ p o st.s k
remove all spaces and send me an empty mail, Ill send you the code. As it is now, it restores the source succesfully (minor issues with footnotes) in the whole document.
oh and btw, thumbs up for your helpfulness!
thanks,
Miro | | |