Hi All,
I have been going crazy with the Microsoft.Office.Interop.Word DotNet variable.
I am able to open Word, but have been unsuccessful in finding a method to open a specific doc and to set text fields in the document.
Does anyone have a sample which works in 2009 R2?
Thanks so much,
Michael
0
Comments
I have lots of code that manipulates Word documents, but I am having trouble executing the code using the microsoft.Office.Interop.Word assembly from NAV 2009 R2 as a DotNet variable in a Code Unit.
I was hoping someone had written some C/AL code which used the assembly.
I am able to open Word from NAV using the assembly, but have not been successful at manipulating it at all, even to the extend of making the Word application visible.
I can only verify that I am starting Word successfully from NAV because I can see it in the Task Manager Processes list every time the code executes.
Thanks again for your time and attention.
Michael
Using Interop intead of Word could solve the security and heap problems we face....
Thanks for your input.
I gave up on the thing and will re-visit it when we upgrade to version 2013.
In the meantime, I implemented what I needed to do using the Automation functionality.
If I understand correctly, Automation uses COM technology, which is older, but proven.
It also has its own set of issues, but they are surmountable or live-withable.
Michael
Because I got crazy too, I thought of the most logical solution: NAV2013.
You can find the sample you need in CU 5054, works for me.
Benno
I did read that 2013 had vast improvements in the Interop assemblies.
We are about a year out from upgrading, however, so I will have to wait until then.
In the meantime, thanks for the tip on CU 5054.
Michael