Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Francisc Molnar
 
Posts: n/a
Default how to suppress Invalid Merge Field prompt

Hi all
If the datasource associated with the document does not contain columns for
each field in the document, a prompt is shown: Invalid Merge Field, with
Remove, Cancel and OK buttons.
Is there a way to prevent this dialog from appearing ? or to provide a
default answer for it ?
I've already set Visible = false and DisplayAlerts =
WdAlertLevel.wdAlertsNone for the application.
thanks
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default how to suppress Invalid Merge Field prompt

I don't believe there is a way to suppress this dialog. It may be possible
to do it by trapping the appropriate Windows messages, (there is a similar
utility that supppresses Outlook's prompts during an e-mail merge -see
http://www.contextmagic.com/express-clickyes/ - it may even be owrth asking
them if they can do a version that solves this other probblem, /and/ the one
where a dialog pops up when Word can't find its data source).

[
FWIW, I suspect some people use code to try to compare the list of fields in
the merge document with the list of fields in the data source, but there are
some difficulties making it completely reliable, e.g.
a. because the messages can pop up even before you start a merge, it may
not be possible to open the mail merge main document without seeing the
dialog.
b. to avoid the message, you can consider opening a blank document and
inserting the mail merge main document into it. This kills the connection
with the mail merge data source, but
- the resulting document may not be the same
- unless you already know what data source the mail merge uses, by doing
that you lose the ability to inspect the list of fields in the data source
c. reliably finding all the fields in a document is non-trivial because it
is difficult, if not impossible, to iterate through absolutely all parts of
a document (some stuff in headers and footers may theoretically be missed.
However, documents with fields in such awkward places are probably the
exception rather than the rule.
d. Word truncates and modifies any long field field names in the data
source, so in theory you need to know how it does that in order to match
merge field field names to data source field names.
]

Peter Jamieson

"Francisc Molnar" wrote in
message ...
Hi all
If the datasource associated with the document does not contain columns
for
each field in the document, a prompt is shown: Invalid Merge Field, with
Remove, Cancel and OK buttons.
Is there a way to prevent this dialog from appearing ? or to provide a
default answer for it ?
I've already set Visible = false and DisplayAlerts =
WdAlertLevel.wdAlertsNone for the application.
thanks



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I mail merge to EMAIL from MS Word AND add a pdf attachment [email protected] Mailmerge 24 January 15th 07 09:33 PM
Help to merge Image (Doug Robins?) JohnB Mailmerge 21 June 23rd 05 05:28 PM
How do I omit an empty date merge field? Phildeman Microsoft Word Help 5 June 13th 05 03:29 PM
Includetext Merge Field Jan Mailmerge 1 April 19th 05 01:36 AM
Enhance merge to email feature of word with cc: merge field. Efficeint Word User Mailmerge 2 April 5th 05 05:05 AM


All times are GMT +1. The time now is 02:03 AM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"