View Single Post
 
Old 07-20-2015, 12:16 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,760
macropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud of
Default

Hi Donna,
Quote:
Originally Posted by dmarie123 View Post
So, I've processed about 10 of the reports with the macro and then queried the imported text file (which is AWESOME) in Access. I have around 45 search terms in the Access query but I'm only getting hits on about 2% of the names so I'm wondering if it would be better/possible to search what the macro extracts?

When you helped me with this: https://www.msofficeforums.com/word-...xtensions.html, the macro used a spreadsheet to search and replace which I think could be applied here? How would I build wildcards in to that? For example, if I want to search for "* MD*", so a space plus "MD", with wildcards at either end but outside the space that precedes the "M".
I think you meant this thread: https://www.msofficeforums.com/word-...cel-range.html

In that macro, you'd change:
.MatchCase = True
.MatchWholeWord = True
to:
.MatchWildcards = True
Naturally, you'd need a workbook with valid wildcard Find/Replace expressions, too.
Quote:
There are only 5 parameters in Access that need a wildcard then a space then the word to be searched and then another wildcard. Maybe I could have Word use an Excel spreadsheet for concrete search words and then still use Access for the 5 different ones? Throwing ideas out, not sure what the best approach is...
I can't really give any advice on what you'd need for Access, as I have no practical experience with that application.
Quote:
This is what is working for me right now, I changed the second curly bracket to "12
Given what you said earlier, about the dates, you should probably have changed:
.Text = "<[0-9]{7,9}[ ]{3}[!^13]{1,}"
to:
.Text = "<[0-9]{10,12} [!^13]{1,}"
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote