#1
|
|||
|
|||
Select Contacts dialog prompted twice.
In Word 2007, I have automated my mail merge letter using a template letter containing my mail merge fields, outlook contacts as the data source etc. and a visual basic macro.
In Word Visual Basic I use the Documents.Add method to open the template e.g.: Documents.Add Template:=XDoc, NewTemplate:=False where XDoc is the location of my template. This works fine except that I am prompted twice with the Select Contacts dialog box using the Documents.Add method: How do I stop the prompt appearing twice? TIA |
#2
|
||||
|
||||
Without seeing more than 'Documents.Add Template:=XDoc, NewTemplate:=False', it's not really possible to do much of a diagnosis.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Quote:
Open Word 2007. Create a mail merge letter using outlook contacts as data source. Insert mail merge field «Address». Save document to desktop as a word template e.g. Address.dotx. Create a blank macro and add the line: Documents.Add Template:="C:\Users\myusername\Desktop\Address.dot x", NewTemplate:=False Run the macro. Select Contacts dialog prompt occurs twice. Hope this helps to clarify/diagnose the problem. |
#4
|
||||
|
||||
I don't use outlook, so I can't test with that directly.
However, I note that you say to save the dotx template, but you give no indication that you've closed it. Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Quote:
create a macro and store it in the normal.dotm |
#6
|
|||
|
|||
Further testing seems points to the Documents.Add method.
If I use the Documents.Open method I don't get dialog prompt twice. |
#7
|
||||
|
||||
Hi mville,
The problem is related to the fact you're using a template with a datasource attached - you get prompted once for the template and once for the document it creates. If you use a document instead of a template, you don't get the template-based prompt.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to automatic save Sending or replying contacts e-mails into contacts? | biologus | Outlook | 1 | 09-12-2011 01:14 PM |
Suppress Dialog Box | crutch024 | Word | 0 | 08-17-2010 09:52 AM |
show dialog box | rutica | Mail Merge | 1 | 06-02-2009 10:25 AM |
Two Contacts, Same Address! Mail merging married contacts?!! | tomtomlo | Outlook | 0 | 03-26-2008 03:21 PM |
Password dialog | akwoods | Outlook | 2 | 01-09-2006 09:09 AM |