WordManagement CU compilation error

rajpal
Member Posts: 10
Hi,
My motive is to add 1 field in the WordManagement Codeunit in three functions - ExecuteMerge, ShowMergedDocument and CreateHeader which would provide this field in the mail merge document created on fly.
I have Win 2000 Prof OS and MS Office 2000.
Before adding the code in the CU 5054, if I compile, it flashes an error
" You have specified an unknown Variable - OpenDataSource2000 - Define the variable under Global C/AL Code"
So, does this error appearing after I add the code for adding field in the document. I saved the object without compiling it and executed the Show button on the Interaction Log Entries Form. But it gives an error saying that the CU should be compiled.
If anybody has encountered such a problem, pls share the solution with me.
Thank you in advance.
My motive is to add 1 field in the WordManagement Codeunit in three functions - ExecuteMerge, ShowMergedDocument and CreateHeader which would provide this field in the mail merge document created on fly.
I have Win 2000 Prof OS and MS Office 2000.
Before adding the code in the CU 5054, if I compile, it flashes an error
" You have specified an unknown Variable - OpenDataSource2000 - Define the variable under Global C/AL Code"
So, does this error appearing after I add the code for adding field in the document. I saved the object without compiling it and executed the Show button on the Interaction Log Entries Form. But it gives an error saying that the CU should be compiled.
If anybody has encountered such a problem, pls share the solution with me.
Thank you in advance.
0
Comments
-
Oh, you are shure that you have Word 2000 :?:
Can you compile it with "OpenDataSource" :?:
You can also see which function you need, if you make a manuel Mailmerge in Word with open an datasource (active the Macrofunction to record). Take a look into the Macro. Ther you can see which function you need.
RegardsDo you make it right, it works too!0 -
I have MS Office 2000 installed on the with OS as Win 2000 Prof and Navision 4.0 , but still it gives the error
I tried compiling this particular on a pc with OS XP and Office 2003, it got compiled and I was able to add the field I wanted to.
Does it have something to do with the compatilbility of Office and OS used with the version of Navision.
Kindly advice in detail.....0 -
Since Office 2001 / 2002 exist the function OpenDataSource2000.
When you will use an older office (97,98,2000) you must change the code to
OpenDataSource.
An example:{Function} CreateWordAttachment(WordCaption : Text[260]) NewAttachNo : Integer Attachment."File Extension" := 'DOC'; IF ISCLEAR(wrdApp) THEN CREATE(wrdApp); //NEWCODE + //identify here the wordversion (new txt variable) WordVersion := wrdApp.Version; //NEWCODE - . . . ParamInt := 7; // 7 = HTML //NEWCODE + //wrdDoc.MailMerge.OpenDataSource2000(MergeFileName,ParamInt); case Wordversion of '9.0': wrdDoc.MailMerge.OpenDataSource(MergeFileName,ParamInt); 'here other older versions': else wrdDoc.MailMerge.OpenDataSource2000(MergeFileName,ParamInt); end; //NEWCODE - FileName := Attachment.ConstFilename; wrdDoc.SaveAs2000(FileName); //May be, here you must do the same wrdDoc.ActiveWindow.Caption := WordCaption; wrdDoc.Saved := TRUE;
RegardsDo you make it right, it works too!0 -
Hey Garak....
Thanks very much for comprehensive explanation.
Well, I did a work around for it.
I installed MS Office 2003, and then compiled the object. It worked. Once, modified from my pc (with Office 2003) I compiled and saved the CU.
After that, if any calls from the form made to that particular CU 5054, it works perfectly.
Thanks once again.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