![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Microsoft Office support MS Office support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#21 (permalink) |
|
Registered User
Join Date: Oct 2009
Posts: 14
OS: Win7
|
Re: Word Macro Issue
it gives me an error of 5560?
the find what text contains a pattern match expression that is not valid? highlight .Execute Replace:=wdReplaceAll |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#24 (permalink) |
|
TSF Enthusiast
Join Date: Apr 2008
Location: Australia
Posts: 562
OS: Vista
|
Re: Word Macro Issue
Hi swaneon,
OK, what was the Find expression? My guess is your checklist.doc has one or more empty paragraphs. You should clean them out. And, here's some new code for the For - Next loop that ignore empty paragraphs: Code:
For Each oPara In docRef.Paragraphs
If oPara.Range.Characters.Count > 1 Then
Set wrdRef = oPara.Range
wrdRef.MoveEnd wdCharacter, -1
.Text = "<" & Trim(wrdRef.Text) & ">"
.Execute Replace:=wdReplaceAll
End If
Next
__________________
Cheers macropod (MS MVP -Word) Last edited by macropod; 10-04-2009 at 08:48 PM. |
|
|
|
![]() |
| Thread Tools | |
|
|