Options

NAV 4.00 SP3 with Word 2007 Automation

Marcus_RossMarcus_Ross Member Posts: 3
Hallo Everybody,

I like to use the automationserver for Word in Navision. For Office 2003 everything is fine.

Now I like to use the Microsoft Word 12.0 Object Library.Application automation for 2007.

If I like to compile the following:
CREATE(wrdApp);

I got the error: The Variable WRDAPP::MAILMERGEDATASOURCEVAL is defined more than once.

Can someone help me?

Greetz,
Marcus

Answers

  • Options
    bernatrmbernatrm Member Posts: 5
    It looks like an error from the automation...

    If you de clare the variable with the property "with events", you can see that there are 2 events with the same name:

    Declared events for "wrdApp"
    ....
    wrdApp::MailMergeAfterRecordMe(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document")

    wrdApp::MailMergeBeforeMerge(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document";StartRecord : Integer;EndRecord : Integer

    wrdApp::MailMergeBeforeRecordM(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document";VAR Cancel : Boolean)

    wrdApp::MailMergeDataSourceLoa(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document")

    wrdApp::MailMergeDataSourceVal(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document";VAR Handled : Boolean)

    wrdApp::MailMergeWizardSendToC(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document")

    wrdApp::MailMergeWizardStateCh(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document";VAR FromState : Variant Value;VAR ToSta

    wrdApp::WindowSize(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document";Wn : Automation "'Microsoft Word 12.0 Object Librar

    wrdApp::XMLSelectionChange(Sel : Automation "'Microsoft Word 12.0 Object Library'.Selection";OldXMLNode : Automation "'Microsoft Word 1

    wrdApp::XMLValidationError(XMLNode : Automation "'Microsoft Word 12.0 Object Library'.XMLNode")

    wrdApp::DocumentSync(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document";SyncEventType : Integer)

    wrdApp::EPostageInsertEx(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document";cpDeliveryAddrStart : Variant Value;cpDeliver

    wrdApp::MailMergeDataSourceVal(Doc : Automation "'Microsoft Word 12.0 Object Library'.Document";VAR Handled : Boolean)
    ==============

    The same error ocurs on Nav 3.70B and 4.0 SP1
  • Options
    JoeKJoeK Member Posts: 53
    In fact you have to change the name of your automation variable because that name ist already in use by the system...

    Greetings
  • Options
    Marcus_RossMarcus_Ross Member Posts: 3
    Thank´s to all. The textexport solved the problem. Deleted all Event´s an the code compile well!

    :P
Sign In or Register to comment.