Office and DDE

User avatar
hlewton
PlatinumLounger
Posts: 3810
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Office and DDE

Post by hlewton »

Got an Office Watch news letter saying "DDE is dead." In trying to search and understand it I’m not sure I have been successful. I don’t think I am using it or ever have. However, I do have a question. I use a lot of mail merges created in Word that opens Access databases and uses specific queries within it to get the data for the mail merges. Does this require DDE? If so and it is dead what would I need to do to keep my mail merges working as they should?

Thanks.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78461
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Office and DDE

Post by HansV »

In early versions of Office, DDE was the default method for connecting to an Access database in mail merge, but since Office 2000, OLE DB has been the default method. So you probably don't use DDE.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3810
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Office and DDE

Post by hlewton »

HansV wrote:In early versions of Office, DDE was the default method for connecting to an Access database in mail merge, but since Office 2000, OLE DB has been the default method. So you probably don't use DDE.
Thanks for that information but I have to ask another question. I created most all of my mail merges and Access databases back when I was using Office 97. I have updated every Access database to the latest version of Access, *.accdb. I have moved all the databases to a folder, as you suggested awhile back so they could be located in a folder that could be used on multiple computers. By this I mean all my databases are located in a folder named C:\Access Databases so if I get a new computer I can create that folder and place the files there. I have edited all my mail merges to find the source databases in that folder but even with all this updating and redirecting the mail merges I still do not know if DDE is in use. I hope it isn't but is there any way I can check to be sure?
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78461
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Office and DDE

Post by HansV »

You can only use DDE with .mdb (or .mde) databases; it doesn't work with .accdb (or .accde) databases. So if you use a .accdb/.accde database as data source, you do NOT use DDE.

If you use a .mdb/.mde database as data source, you can do the following:
- Open a mail merge document (a document with merge fields).
- Word will ask you if it's OK to run a SQL statement. Answer Yes.
- If the Access database is opened in the Access interface in the background, you're using DDE, otherwise not.
- To make sure:
- Press Alt+F11 to activate the Visual Basic Editor.
- Press Ctrl+G to activate the Immediate window.
- Type or copy/paste the following line:

Code: Select all

? ActiveDocument.MailMerge.DataSource.Type
- With the insertion point anywhere in that line, press Enter.
- If the result is 1, you're using DDE. If it is another number, you're NOT using DDE.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3810
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Office and DDE

Post by hlewton »

Thank you for the information.
Regards,
hlewton