PDA

View Full Version : DDE & ACAD LT



djohnston
2004-06-21, 01:08 PM
I am trying to find a way to use VBA for Excel to print a drawing from AutoCAD LT 2002. I am currently printing checksheets from Excel and would like to print the corresponding ACAD files from the same macro. What I would like to know is if there's a way to use DDE commands to start LT, open a file, print, close the file, and close LT. Sounds simple, but I have no experience with DDE commands. Any help would be appreciated.

Ed Jobe
2004-06-21, 02:26 PM
This should get you started.http://members.iinet.net.au/~bigbyte/vb.htm#dde

djohnston
2004-06-21, 05:47 PM
I followed the directions on the website including the textbox and command button, but when VBA began to compile the macro, it did not recognize the LinkMode, LinkTopic, or LinkExecute commands. I searched the Object Browser and couldn't find them there either. Is there an add-in that is required for these commands?

Ed Jobe
2004-06-21, 06:08 PM
If you note in that article, the list of controls that support those methods, they are vb controls. MDIForm is an obvious tip off. If vba is your only option, you would have to resort to windows api calls (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mslu/winprog/unicode_layer_message_message_queue_and_dde_functions.asp).