From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I insert text into a Microsoft Word template using Activex?

I am trying to insert data into a Microsoft Word template. The template has the following fields:

 

Date:

 

Operator:

Supervisor:

Data:

Variance:

Serial Number:

 

 

In addition to these items, it has a header and a footer.

 

0 Kudos
Message 1 of 6
(3,816 Views)

Do it the same as if you were inserting it into a standard Word document. Apparently the only difference between a document and a template is the file extension.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 6
(3,795 Views)

Thanks Mike.

 

I am new to ActiveX, so I don't know how to insert into either a Word document or template

0 Kudos
Message 3 of 6
(3,780 Views)

Hi Nelshinio,

 

Here is a link on using the Report Generation Toolkit, which is what you will need to insert into either a Word Document or a template for a Word Document.

 

http://www.ni.com/white-paper/11250/en/

 

It outlines the VIs to do this under the section "Adding to Word Document Created from a Template".

 

 

Peter T
Applications Engineer
National Instruments
Message 4 of 6
(3,772 Views)

Thanks Peter.

 

I don't have the Report Generation Toolkit, so I am trying to see if I can accomplish this using ActiveX

0 Kudos
Message 5 of 6
(3,765 Views)

If this is something that is important to you (and your project), I strongly urge you to get the Report Generation Toolkit.  Several years ago (before NI greatly improved the toolkit), I needed to read and write data to an Excel Workbook.  It was not easy using the toolkit, so I bit the bullet and learned enough ActiveX to accomplish the task (it wasn't easy).

 

I recently was revisiting this application (the Workbook had been significantly redesigned, with different Worksheets and a much better organization).  I discovered that the new Report Generation Toolkit functions were much easier to use, and worked much better, than either the older Toolkit or my custom ActiveX solution.  Furthermore, I discovered that ActiveX "support" within both LabVIEW and Microsoft, in general, was largely missing -- while it was still present on the old Windows XP system running LabVIEW 7.0 and Office 2003, I had a lot of difficulty even finding the appropriate Help files for Windows 7, LabVIEW 2012, and Office 2010.  Another reason to use the Report Generation Toolkit ...

0 Kudos
Message 6 of 6
(3,750 Views)