Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Trigger a find/replace on mail merge?
I'm trying to make a directory, pulling in data from an ODBC database to
make a mail merge. For simplicity, let's just say the template looks like this: { MERGEFIELD "lastname"}, { MERGEFIELD "firstname" } All well and good. The only problem is that the database stores any special characters as HTML entities (since the DB is primarily used for displaying the directory on the web). Thus, the accent characters in Jose Pinera (over the "e" in "Jose" and "n" in "Pinera") are stored in the database as: lastname: Piñera firstname: José Now, there are only a few of these, so a few search/replace commands should be able to convert the HTML entities back into the actual letters. I can't figure out how to incorporate this into the mail merge, though. Is it possible to setup my document such that, with a single push, the mail merge can run and a find/replace function can go through "lastname" and "firstname", replacing all the HTML entities I specify with their actual (ISO-8859-1) characters? Thanks to anyone who can help! |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Trigger a find/replace on mail merge?
If you record a Word macro that merges to an output document, you can then
modify that macro so that it also does a number of find/replace operations on the output document. All you really need to know is that when the merge is complete, the output document is the ActiveDocument (if you need to do things to the Mail Merge Main DOcument post-merge, make a reference to it before you execute the merge). You'll probably find plenty of samples of find/replace VBA code in the word.vba newsgroups here, and probably at http://word.mvps.org as well. Peter Jamieson "George Adams" wrote in message ... I'm trying to make a directory, pulling in data from an ODBC database to make a mail merge. For simplicity, let's just say the template looks like this: { MERGEFIELD "lastname"}, { MERGEFIELD "firstname" } All well and good. The only problem is that the database stores any special characters as HTML entities (since the DB is primarily used for displaying the directory on the web). Thus, the accent characters in Jose Pinera (over the "e" in "Jose" and "n" in "Pinera") are stored in the database as: lastname: Piñera firstname: José Now, there are only a few of these, so a few search/replace commands should be able to convert the HTML entities back into the actual letters. I can't figure out how to incorporate this into the mail merge, though. Is it possible to setup my document such that, with a single push, the mail merge can run and a find/replace function can go through "lastname" and "firstname", replacing all the HTML entities I specify with their actual (ISO-8859-1) characters? Thanks to anyone who can help! |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find multiple characters in one find using MSword find/replace | Microsoft Word Help | |||
Mail Merge & Find/Replace | Mailmerge | |||
Using find and replace or macros to replace page ranges | Microsoft Word Help | |||
Find/ Replace is auto-capping the words I want to replace with | Microsoft Word Help | |||
Is it possible to use find replace for Merge Field data | Mailmerge |