Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2012, 06:54 AM
mville mville is offline Select Contacts dialog prompted twice. Windows 7 64bit Select Contacts dialog prompted twice. Office 2007
Novice
Select Contacts dialog prompted twice.
 
Join Date: Feb 2012
Location: London, UK
Posts: 4
mville is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 02-23-2012, 10:54 PM
macropod's Avatar
macropod macropod is offline Select Contacts dialog prompted twice. Windows 7 64bit Select Contacts dialog prompted twice. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 02-24-2012, 03:28 AM
mville mville is offline Select Contacts dialog prompted twice. Windows 7 64bit Select Contacts dialog prompted twice. Office 2007
Novice
Select Contacts dialog prompted twice.
 
Join Date: Feb 2012
Location: London, UK
Posts: 4
mville is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Documents.Add Template:=XDoc, NewTemplate:=False', it's not really possible to do much of a diagnosis.
Try this (it takes 1 minute to reproduce the issue):

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.
Reply With Quote
  #4  
Old 02-24-2012, 10:11 PM
macropod's Avatar
macropod macropod is offline Select Contacts dialog prompted twice. Windows 7 64bit Select Contacts dialog prompted twice. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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:
Create a blank macro and add the line:
Where? In the template? In an new document based on the template, or in a new document not based on the template?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 02-25-2012, 06:49 AM
mville mville is offline Select Contacts dialog prompted twice. Windows 7 64bit Select Contacts dialog prompted twice. Office 2007
Novice
Select Contacts dialog prompted twice.
 
Join Date: Feb 2012
Location: London, UK
Posts: 4
mville is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
I note that you say to save the dotx template, but you give no indication that you've closed it.
OK, Save it and close it.

Quote:
Originally Posted by macropod View Post
Where? In the template? In an new document based on the template, or in a new document not based on the template?
create a macro and store it in the normal.dotm
Reply With Quote
  #6  
Old 02-25-2012, 06:51 AM
mville mville is offline Select Contacts dialog prompted twice. Windows 7 64bit Select Contacts dialog prompted twice. Office 2007
Novice
Select Contacts dialog prompted twice.
 
Join Date: Feb 2012
Location: London, UK
Posts: 4
mville is on a distinguished road
Default

Further testing seems points to the Documents.Add method.

If I use the Documents.Open method I don't get dialog prompt twice.
Reply With Quote
  #7  
Old 02-26-2012, 03:30 AM
macropod's Avatar
macropod macropod is offline Select Contacts dialog prompted twice. Windows 7 64bit Select Contacts dialog prompted twice. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Contacts dialog prompted twice. 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
Select Contacts dialog prompted twice. 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft