Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 31 Jan 2006 18:10:45 +0530,    group: microsoft.public.word.vba.customization        back       


automatically closing Access datasource after Word merge   
Hi everyone

I have created a userform that allows for several mailmerge templates
to be selected and merged with specific records from an Access
Database.

It is working beautifully, however with each merge, the Access database
opens.  If the user merges, say, 10 templates, then 10 copies of the
database opens.

Is there a way I can do this that either:

a)  closes the datasource after merge (the datasource is Access not
Word); or
b)  reads the datasource without having to open it.
or
c) any other way you may be able to think of.

Thanks for your help.


-- 
btcPosted from - http://www.officehelp.in
date: Tue, 31 Jan 2006 18:10:45 +0530   author:   btc

Re: automatically closing Access datasource after Word merge   
Hi Btc, 

It always helps to mention the version of Word involved in a problem. 
Word's mail merge changed significantly in Word 2002. I can tell from the 
behavior you describe that you're using a DDE connection to the Access 
database. Given the problems you're having, an ODBC connection would be 
better, but I can't tell you how to get that syntax unless I know the 
version of Word involved.

Also: does your data contain any numbers or dates that require a 
particular format?

> I have created a userform that allows for several mailmerge templates
> to be selected and merged with specific records from an Access
> Database.
>  
> It is working beautifully, however with each merge, the Access database
> opens.  If the user merges, say, 10 templates, then 10 copies of the
> database opens.
>  
> Is there a way I can do this that either:
>  
> a)  closes the datasource after merge (the datasource is Access not
> Word); or
> b)  reads the datasource without having to open it.
> or
> c) any other way you may be able to think of.
>  
> Thanks for your help.
>

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or 
reply in the newsgroup and not by e-mail :-)
date: Tue, 31 Jan 2006 17:05:34 +0100   author:   Cindy M -WordMVP-

Re: automatically closing Access datasource after Word merge   
Thanks for the reply Cindy

The version of Word and Access is 2000.

Thank you


-- 
btcPosted from - http://www.officehelp.in
date: Wed, 1 Feb 2006 03:47:06 +0530   author:   btc

Re: automatically closing Access datasource after Word merge   
Hi Btc, 

> The version of Word and Access is 2000.
>
OK. You'll need to record a macro while making the ODBC connection in order 
to get the syntax you need for the OpenDataSource method. But you might want 
to make a couple of dry runs first, just to be sure you've got the moves 
down.

In the Open DataSource dialog box activate the "Select method" checkbox. 
This should bring up a list of available connection methods, select ODBC.

If you need to connect to a query in the Access database, click the 
"Options" button in the next dialog box and activate "Views" in the one that 
follows. That should append a list of queries to the list of tables.

> It always helps to mention the version of Word involved in a problem. 
> Word's mail merge changed significantly in Word 2002. I can tell from the 
> behavior you describe that you're using a DDE connection to the Access 
> database. Given the problems you're having, an ODBC connection would be 
> better, but I can't tell you how to get that syntax unless I know the 
> version of Word involved.
>  
> Also: does your data contain any numbers or dates that require a 
> particular format?
>  
> > I have created a userform that allows for several mailmerge templates
> > to be selected and merged with specific records from an Access
> > Database.
> >  
> > It is working beautifully, however with each merge, the Access database
> > opens.  If the user merges, say, 10 templates, then 10 copies of the
> > database opens.
> >  
> > Is there a way I can do this that either:
> >  
> > a)  closes the datasource after merge (the datasource is Access not
> > Word); or
> > b)  reads the datasource without having to open it.
> > or
> > c) any other way you may be able to think of.
>

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or 
reply in the newsgroup and not by e-mail :-)
date: Wed, 01 Feb 2006 18:23:58 +0100   author:   Cindy M -WordMVP-

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us