0 Replies - 1159 Views - Last Post: 02 August 2008 - 12:21 PM Rate Topic: -----

#1 HowdeeDoodee  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 78
  • Joined: 17-June 08

Need To Use Paragraph Mark In Wildcard Search Macro

Posted 02 August 2008 - 12:21 PM

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.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1