LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running macro on Table using Report Generation Toolkit and Office 2003 Incompatible!!!!!!!

Hi,
I am using some functions under the Report Generation toolkit (LabView 7.1). We recently updated our test PCs from Office 2000 to 2003. The "WORD IMPORT MODULE.VI" returns error code -41113 when used with Word 2003. No problem on Word 2000.
 
In fact even the example VI available under Find Examples - Run Macro on Word Table fails and returns error code -41113 when "WORD IMPORT MODULE.VI" is called on Word 2003. Word 2000 is OK.
 
Any one faced this problem???? Any solution to this problem??
 
I would greatly appreciate your feedback / suggestions.
 
Thanks,
Mim
0 Kudos
Message 1 of 5
(4,451 Views)

Just to add a note on the security setting for Macros... I have tried Low and Medium level setting for security but Word Import Module.vi still fails.

Looking forward to your feedback.

Thanks,

Mim

0 Kudos
Message 2 of 5
(4,447 Views)

Here's the text from the -41113 error:

"Report Generation Toolkit: You have not selected Visual Basic Project as a Trusted Source in Microsoft Word or Excel. Check the Macro Security settings in Word or Excel."

In addition to setting the macro security level to "Low", you must also follow the advice from the error message and make VB a trusted macro source.  To do this in Word 2003, go to Tools > Options > Security > Macro Security > Trusted Publishers and click the checkbox next to both "Trust all installed add-ins and templates" and "Trust access to Visual Basic Project".  If you do this, you should be good...I've used the Word Import Module.vi several times without difficulty as long as I had these settings correct.  To double-check that it works right, you can also run the Word Macro example at examples\office\Word Examples.llb\Run Macro on Word Table.vi.

If you're still having trouble even after making this change, you may want to check with your IT department to make sure they don't have any software installed on your machine that blocks macros from running.

Good luck,
-D

Message 3 of 5
(4,442 Views)

darren,

thanks for your reply.

After checking the the property "Trust access to Visual Basic Project" , I get the following error message:

Exception occured in Microsoft Word, Unable to run the specified macro. Help Path is C:\Program Files\Microsoft Office\OFFICE11\1033\wdmain11.chm and context 37401 in Word Run Macro.vi->SetFirstRowAsTableHeaderforWord(Macro).vi->Generate Report.vi

I can run the macro directly from Word.. no problem running macros in Excel dirently either. I get error message only when running macro from LabView. So, I doubt if it is an IT issue.

You don't have a problem with Word 2003 and Word Import Module.vi???

I am attaching my Vi-Report Generation.vi and the subvi. I would so much appreciate if you run ReportGenerate.vi on your PC and let me know if there is a problem.

Many Thanks for your help.

Mim

0 Kudos
Message 4 of 5
(4,439 Views)
Darren,
I figured out the problem...
I had set incorrect macro name in Word Run Macro.vi
 
Thanks for helping me out..
 
Checking property "Trust access to Visual Basic Project" resolved the problem.
 
Many Thanks,
Mim
0 Kudos
Message 5 of 5
(4,434 Views)