LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Find/Replace MSWord wildcard characters from within Excel

Excel 2003, Windows XP

This code, based in an Excel workbook, retrieves words from Microsoft Word (Word 2003). But first it strips out all punctuation. I'm having trouble stripping out the wildcard characters.

This is the code fragment not working:

Set oRange = ActiveDocument.Range
With oRange.Find
.Text = "?"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
End With
oRange.Find.Execute Replace:=wdReplaceAll


I've tried replacing
.Text = "?"
with
.Text = "/?"

which is the MSWord signal to look for the actual character mark, and

.Text = "~?"

which is the Excel signal to look for the actual character mark, but neither works.

Any ideas? I also need this to find the MSWord wildcard characters ! and *.

Thank you!
Susan
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using wildcard characters in find & replace Tola Excel Worksheet Functions 4 May 5th 10 07:35 PM
Use of Wildcard characters with replace tonuab Excel Discussion (Misc queries) 2 November 6th 09 09:39 PM
Find and Replace Command Using Wildcard Help rgilbreath Excel Discussion (Misc queries) 1 October 10th 08 04:01 AM
Find Replace Wildcard dk New Users to Excel 9 September 23rd 08 03:45 AM
How do you find and replace a Wildcard character in Excel? Wildcard Excel Discussion (Misc queries) 8 August 18th 05 01:18 AM


All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"