1 Attachment(s)
Problem with Microsoft Word XP 2002 / XP 2003
Hi all,
Alert about Micorsoft Word Issue/Bug:
We are facing some issues when working with Find and Replace option with Microsoft Word XP.
Please see the attachment, If you guys have any solution to that, pls let me know.
Pls update with your valuable comments.
Thanks,
CS.
Re: Problem with Microsoft Word XP 2002 / XP 2003
No bug, just needing to completely use the function.
Next time it may be better to just paste the doc text instead.
VB Code:
'This will search for "s" and replace the "s" with a bold "[b]s[/b]".
With ActiveDocument.Content.Find
.Format = True
.Replacement.Font.Bold = True
.Execute Forward:=True, Replace:=wdReplaceAll, FindText:="s", ReplaceWith:="s"
End With
Re: Problem with Microsoft Word XP 2002 / XP 2003
Quote:
Originally Posted by RobDog888
No bug, just needing to completely use the function.
Next time it may be better to just paste the doc text instead.
VB Code:
'This will search for "s" and replace the "s" with a bold "[b]s[/b]".
With ActiveDocument.Content.Find
.Format = True
.Replacement.Font.Bold = True
.Execute Forward:=True, Replace:=wdReplaceAll, FindText:="s", ReplaceWith:="s"
End With
Hi, Pls check the attached word file (previous post) carefully. I never typed any word manually. I haven't used the coding to find and replace here. If I find and replace a word which contains individual formatting, after replacing the word the individual formatting is gone forever. For example, pls look at the attached word file (previous post). Thanks, CS.
Re: Problem with Microsoft Word XP 2002 / XP 2003
You can not just execute a .Find and keep formatting unless you prepare it.
The basic .Find will clear all formatting on the search/replace criteria unless you set the Replacement object with the formatting you wish
and designate the Format:=True in the Find cruiteria.
Re: Problem with Microsoft Word XP 2002 / XP 2003
Quote:
Originally Posted by RobDog888
You can not just execute a .Find and keep formatting unless you prepare it.
The basic .Find will clear all formatting on the search/replace criteria unless you set the Replacement object with the formatting you wish
and designate the Format:=True in the Find cruiteria.
I will not use any vba coding here. I just using the Word Find and Replace (By pressing the Ctrl + H) to find and replace a word as I mentioned in the attachement. Pls check and if you find any solution let me know. I am not facing any issues with Office 2000. But in Office XP 2002 and 2003 only I am facing the issue. Thanks! CS.
Re: Problem with Microsoft Word XP 2002 / XP 2003
Oh, sorry for the misunderstanding. I will test it out again manually and see what I can come up with.