Microsoft.Office.Interop.Word Open Specific Doc + Set Fields

MJV
Member Posts: 38
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
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
-
-
Thanks so much for your response.
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.
Michael0 -
All my older c/all code with Excel works in the RTC but Word is a problem. Didn't think about the interop but would love to see some examples too.0
-
Would be very nice to have a word-interop sample.
Using Interop intead of Word could solve the security and heap problems we face....0 -
Hi All,
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.
Michael0 -
Hi 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.
Benno0 -
Thank you 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.
Michael0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions