Prev: How to create Access 2010 Calculated field using VBA ?
Next: emailing a large database - any extreme zip program out there?
From: david on 23 Apr 2010 05:41 If I remember correctly, Word has three (?) different methods for doing mail merge. In order of invention, they were DDE (Access 2) ODBC (Access 95) OLEDB (Access 2000) Of these, only DDE normally opens Access and runs an autoexec macro. (unless there is some new problem in some new version of Office). So one way might be to change your mail merge document to merge using ODBC rather than DDE. Another way would be to create a new database for mail merge which only contains links to the tables in your real database, (or links to the queries, or queries linked to the tables, or queries linked to the queries) You create a database of table links by importing the tables as links. You create linked queries by specifying the table (or query) and database in a query definition. (david) "InvisibleDuncan" <InvisibleDuncan(a)discussions.microsoft.com> wrote in message news:9E8F1C94-A514-4963-8D69-402B21290067(a)microsoft.com... >I have an Access 97 database that has an autoexec macro that runs every >time > it's opened. However, it's also running every time my users open a Word > document that has a mail-merge from the database. Is there a way for > Access > to know that it's been opened by Word and therefore not run the Autoexec > macro? > > Thanks...
From: InvisibleDuncan on 23 Apr 2010 08:47 Thanks, David - that's very helpful. Believe it or not I'm using Word and Access 97, so that might explain why it's happening. Do you know how to get the document to use ODBC instead of DDE? I'm simply using the default setting that comes from the mail-merge wizard in Word, and there doesn't seem to be an obvious way of stopping it from using DDE. Thanks, -- Duncan "david" wrote: > If I remember correctly, Word has three (?) different > methods for doing mail merge. In order of invention, > they were > > DDE (Access 2) > ODBC (Access 95) > OLEDB (Access 2000) > > Of these, only DDE normally opens Access and runs an > autoexec macro. (unless there is some new problem in > some new version of Office). > > So one way might be to change your mail merge document > to merge using ODBC rather than DDE. > > Another way would be to create a new database for > mail merge which only contains links to the tables in > your real database, (or links to the queries, or queries > linked to the tables, or queries linked to the queries) > > You create a database of table links by importing the > tables as links. You create linked queries by specifying > the table (or query) and database in a query definition. > > > (david) >
From: david on 24 Apr 2010 02:22
I think you have to tell Word not to automatically connect to the mail merge source. That is, choose "select" as the mail merge source type. Then when you start to mail merge, Word will ask you for the source, and you can select an ODBC driver or DSN you have set up. Or I think you can automate this process using VBA. I don't have an examples at hand. (david) "InvisibleDuncan" <InvisibleDuncan(a)discussions.microsoft.com> wrote in message news:8FCBB518-D9AB-470B-8444-674849273F90(a)microsoft.com... > Thanks, David - that's very helpful. Believe it or not I'm using Word and > Access 97, so that might explain why it's happening. Do you know how to > get > the document to use ODBC instead of DDE? I'm simply using the default > setting > that comes from the mail-merge wizard in Word, and there doesn't seem to > be > an obvious way of stopping it from using DDE. > > Thanks, > > -- > Duncan > > "david" wrote: > >> If I remember correctly, Word has three (?) different >> methods for doing mail merge. In order of invention, >> they were >> >> DDE (Access 2) >> ODBC (Access 95) >> OLEDB (Access 2000) >> >> Of these, only DDE normally opens Access and runs an >> autoexec macro. (unless there is some new problem in >> some new version of Office). >> >> So one way might be to change your mail merge document >> to merge using ODBC rather than DDE. >> >> Another way would be to create a new database for >> mail merge which only contains links to the tables in >> your real database, (or links to the queries, or queries >> linked to the tables, or queries linked to the queries) >> >> You create a database of table links by importing the >> tables as links. You create linked queries by specifying >> the table (or query) and database in a query definition. >> >> >> (david) >> |