LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Word .net open document

Have you tried repairing your Office installation? The newer "Click to Run" office installers used by Office 365 and some time before that have a tendency to not properly register some or all of the ActiveX libraries for office. You may be thinking: But I'm using .Net here!

 

Yes you are but did you notice the Interop name in those .Net classes? It means that they are simply autogenerate wrapper classes around some other interface such as, yes you guess it, ActiveX libraries.

 

As such, trying to use .Net Office interfaces if you already have a working ActiveX solution is a little bit like using a sledge hammer to drive a normal hammer to put a nail in. Just another intermediate technology that can add potential failure!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 12
(563 Views)

You can use GitHub - OfficeDev/Open-XML-SDK: Open XML SDK by Microsoft.

 

This library is totally independent of Word or Office installation.

 

Basically the library wraps the XML of a open office (docx, xlsx, pptx) file, but it doesn't abstract it. So it's hard, you do need inside knowledge of word documents. So inserting a text could involve adding a page, adding a page part, adding a document part, etc..

 

I haven't tried OOXML for Word, but I am using it for Excel. It's raw, but solves the AX problems.

0 Kudos
Message 12 of 12
(546 Views)