Word 2007 Report Problem
Gon_M.
Member Posts: 34
Hi Experts:
My Problem is this:
I'm trying to create a report from Navision to Word (Using Automation of course). I tried this based in examples that I find in forum and it worked fine for Word 2003, but when I tried to do the same in Word 2007 I get this error during compilation:
"The variable WRDAPP::MAILMERGEDATASOURCEVAL is defined more then once."
where WRDAPP = 'Microsoft Word 12.0 Object Library'.Application
Any suggestion to avoid this error?
Thanks in advance.
My Problem is this:
I'm trying to create a report from Navision to Word (Using Automation of course). I tried this based in examples that I find in forum and it worked fine for Word 2003, but when I tried to do the same in Word 2007 I get this error during compilation:
"The variable WRDAPP::MAILMERGEDATASOURCEVAL is defined more then once."
where WRDAPP = 'Microsoft Word 12.0 Object Library'.Application
Any suggestion to avoid this error?
Thanks in advance.
0
Answers
-
Rename your variable to WD, basically reduce number of characters in the variable name, so more space is left for the function itself. You can search this forum as well. I have seen many posts about it.
The problem happens when you have functions like
MAILMERGEDATASOURCEVAL1 and
MAILMERGEDATASOURCEVAL2
navision takes only certain number of characters and cuts off the 1 and 2, so you end up with 2 same functions
Hope taht helpsBest Regards,
Oleg0 -
Hi Oleg:
thanks for reply.
You are right. this is the cause of my problem.
Anyway I tried again with a shorter name of var and I get the same error, even I set 1 char name, and it didn't work. The length of function is too much long.
I think that I have to take an alternative way.
Regards.0 -
This problem may be caused by the "WithEvents" property on the automation variable. If you are not using any of the events, you can set this property to no (or it may already be no). Then, you must export the object to text and delete all of the event functions towards the end of the file. Import the object and re-compile. This should resolve the issue.
If you are using any of the events, then do not use this method.
I hope this helps.Zarryn0 -
It Works!!!
Thank you zarryn.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions