Help! Got stucked in trying out export to Ms Words.

weoiliweoili Member Posts: 5
Dear all,

I'm very new here. I recently just tried out to exploring around with the coding and trying to understand on how to write a code for manual export to Ms Words. I try to modify the code to send to Ms Words in Codeunit 403 - "application launch management".

My objective here is just to try printing out a single record out from a "Customer Ledger Entries".
Data that I'm using is the Demo data. Table 21 - "Cust. Ledger Entry"

I wrote a simple code that looks like the following;

AddCustomerLedger (var DataXML : Automation "'Microsoft XML, v4.0'.DOMDocument 4.0")

DocumentElement := DataXML.documentElement;

CustCode := GetAttributeValue(DataXML,'//Object/Control/Control/Row[1]/Control[2]','value');

AddCustomerInfo(DataXML,CustCode);
AddElement(DocumentElement,'WorkDate',FORMAT(WORKDATE),ChildNode);
AddCompanyInfo(DataXML);


I had a feelings that the code is horribly wrong somewhere that caused the whole function does not run completely.

Please help me out there.

Thank you in advance.
~~ Just another newbies trying to learn more things here. ~~
-Sorry in advance for anything I might said or done that hurt anyone.

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    There is a whitepaper about the new Office-XML interface in 5.0 which you are trying to modify. This should describe what you want to do (haven't read it yet).

    You can also export to MSWORD the 'old fashioned' way through automation. Please search this forum for examples.

    Good luck.
  • WaldoWaldo Member Posts: 3,412
  • weoiliweoili Member Posts: 5
    Thank you Mark and Waldo for your respond. Waldo have something that are close to what I wanted but there are still many uncertainty from here.

    Things like how to get a single records out from the table form and how to does it create a reference for the records that we wanted to extract from. As far as I get to know. There is this codeunit 403, which will called to handle all the transaction or transfering of data to xml. That's much I had got to know.

    :?: here is the problem that I face now I do I going to know how the xml data will looks like and which xml nodes to refer to when I writing a custom made xlst?
    ~~ Just another newbies trying to learn more things here. ~~
    -Sorry in advance for anything I might said or done that hurt anyone.
Sign In or Register to comment.