Error when defining variable of type Word Automation

Nagi
Member Posts: 151
Hello NAV experts,
I'm trying to develop a basic mail merge between NAV 5.0 SP1 and Microsoft Word 2007, where I want to update certain mail merge fields with data from record fields in NAV. I haven't done this before, but I'm trying to use the example explained in the Application Designer's Guide on page 371.
The example detailed in ADG seems simple enough, but I can't define a variable of type Microsoft Word 12.0 Object Library with subtype Application without getting a compilation error. The error reads "Variable WordApp::MAILMERGEDATASOURCEVALIDATE" is defined more than once". The only difference (as far as I can tell) between my code and the one from ADG is that the latter uses Microsoft Word 11.0 Object Library.
Has anybody encountered this problem before?
I'm trying to develop a basic mail merge between NAV 5.0 SP1 and Microsoft Word 2007, where I want to update certain mail merge fields with data from record fields in NAV. I haven't done this before, but I'm trying to use the example explained in the Application Designer's Guide on page 371.
The example detailed in ADG seems simple enough, but I can't define a variable of type Microsoft Word 12.0 Object Library with subtype Application without getting a compilation error. The error reads "Variable WordApp::MAILMERGEDATASOURCEVALIDATE" is defined more than once". The only difference (as far as I can tell) between my code and the one from ADG is that the latter uses Microsoft Word 11.0 Object Library.
Has anybody encountered this problem before?
0
Answers
-
Hey Nagi,
the Automation exposes events whith function names which are too long for NAV. Even if you do not activate WITH EVENTS, they are defined in the object. The following 5 steps should do the trick:
1. Save the object without compiling,
2. export as text,
3. remove all EVENTs,
4. import it again and
5. compile.
/CarstenCheers
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.0 -
Thank you! =D> =D> =D>0
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