Code Request: How to do Add fields in our word?

zimbazimba Member Posts: 11
edited 2004-06-04 in Navision Attain
Hi

I Want all selected fields, add the my word file
How to do Add fields in our word?
Tank you for help
CREATE(wdApp);
TemplateName := ('c:\Customer.dot');
wdDoc := wdApp.Documents.AddOld(TemplateName);
wdApp.ActiveDocument.Fields.Add;
IF customer.active= Ture THEN
REPEAT
wdApp.ActiveDocument.Fields.Add(Field Name);
UNTIL NEXT=0;

Comments

  • zimbazimba Member Posts: 11
    up
  • SavatageSavatage Member Posts: 7,142
    I'm not sure I know what your looking for. Are you looking for info on Microsoft Word Automation?
  • zimbazimba Member Posts: 11
    Hi thank you Savatage

    I was starting CAL 2 weeks ago,…
    So My company wanna this function;
    I Use Microsoft Word Automation.
    When I select the some fields in our Field table then this functions auto create the Microsoft Word.Fields.
    CREATE(wdApp); //Automations
    TemplateName := ('c:\Customer.dot'); //File
    wdDoc := wdApp.Documents.AddOld(TemplateName); 
    wdApp.ActiveDocument.Fields.Add; //Add Field
    IF customer.active= Ture THEN  // KEY
        REPEAT // Repeat Start
              wdApp.ActiveDocument.Fields.Add(Field Name); //Add Field by Field Name
      UNTIL NEXT=0; // Until 0
    

    But this code Don’t working. why?

    Please Can you Help Me….
  • zimbazimba Member Posts: 11
    up
Sign In or Register to comment.