LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing using a macro.

I am trying to print a MS Access '97 table via LabVIEW 6. I have created a macro which saves data in Access and finally prints the table. I communicate with Access through DDE (I use DDE Execute.vi with the macro as command). When I run the macro in Access, it works just fine. Running it through LabVIEW causes Access to somehow halt. First time I run macro it prints OK, but after that Access won't run any macros through DDE at all. DDE indicates invalid reference number. If I delete the printing command in the macro, there are no problems. Does anyone have a clue what might be the problem?

Thank you in advance.
0 Kudos
Message 1 of 2
(2,639 Views)
Hey Tifa -

DDE was the precursor to ActiveX and is a somewhat older technology. I would use ActiveX (it is newer, more people are familiar with it, you get better support, etc.) if possible. AND, I have an example that a colleague wrote for how to call Excel Macros from LabVIEW using ActiveX.

There is a TON of example code available for free download on our external support site -> www.ni.com/support. Under Option 3 I searched under the "Examples" with the following string -> "labview activex excel macro". The first item returned is the document I referred to.

Hope this helps!
good luck-
ben schulte
national instruments
0 Kudos
Message 2 of 2
(2,639 Views)