Wednesday 22 December 2010

Using wildcards for searching and replacing in Microsoft Word 2007

I needed to clean up the output from a csvde query by removing the DN from the results. The DN was in the format "CN=...,OU=...,DC=...,DC=...",other data.
To remove only the DN from each line and leave the other data, I pasted the results into Microsoft Word 2007, then opened the 'Replace' dialog. I then clicked on the 'More' button at the bottom left which revealed additional options, including one called 'Use Wildcards'. I put a check against this option, then did a search for "*", to replace with nothing. This immediately cleared up all of my query results, leaving only the other data which I needed.

More information on using wildcards in the Word Find and Replace here: http://www.gmayor.com/replace_using_wildcards.htm