Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 118,589 VB Programmers for FREE! Ask your question and get quick answers from experts. There are 820 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Need To Use Paragraph Mark In Wildcard Search Macro

 
Closed TopicStart new topic

Need To Use Paragraph Mark In Wildcard Search Macro

HowdeeDoodee
post 2 Aug, 2008 - 12:21 PM
Post #1


D.I.C Head

**
Joined: 17 Jun, 2008
Posts: 64

I have a VBA Word wildcard search macro that requires the following line

QUOTE
.Text = "^t^t* - "


be changed to...

QUOTE
.Text = "^p^t^t* - "


The problem is that the ^p (paragraph mark) cannot be used with a wildcard search. I tried using ^13 but that did not work either.

Here is the full macro

QUOTE
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^t^t* - "
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=3
Selection.TypeText Text:=":0"
Selection.MoveRight Unit:=wdCharacter, Count:=3


Is there any way to integrate a paragraph mark into a wildcard search in VBA Word?

Thank you in advance for any replies.
User is offlineProfile CardPM

Go to the top of the page

Closed TopicStart new topic
Time is now: 10/11/08 07:45PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month