RE: MS Word Automation Numered List
Thanks for your suggestion Nev.
Here I leave the code I used to solve my problem.
Thank you again.
CODE:
NewLine := 13;
Tab := 9;
CLEAR(WordApp);
IF ISCLEAR(WordApp) THEN
CREATE(WordApp, TRUE, FALSE);
WordDoc := WordApp.Documents.Add; //Add New Document
WordAppSelection := WordApp.Selection;
WordApp.Run('Macro1'); //Activate the numered list
WordAppSelection.TypeText('Text1');
WordAppSelection.TypeText(FORMAT(NewLine));
WordAppSelection.TypeText('Text2');
WordAppSelection.TypeText(FORMAT(NewLine));
WordAppSelection.TypeText('Text3');
WordAppSelection.TypeText(FORMAT(NewLine));
WordApp.Run('Macro2'); //Deactivate the numered list
WordAppSelection.TypeText(FORMAT(NewLine));
WordAppSelection.TypeText(FORMAT(NewLine));
WordAppSelection.TypeText(FORMAT(TAB));
WordAppSelection.TypeText('Texto3');