Putting 'TABs' Into Word Documents With Automation

Matt.HillMatt.Hill Member Posts: 32
Is it possible (moreover, how) to insert formatting TABs into word documents when using automation from within Navision...?

Thanks.

Comments

  • janpieterjanpieter Member Posts: 298
    yes, have no time to look this up for you, but TAB has an ascii code and there is a way to convert an ascii number to a tekst in navision.
    In a world without Borders or Fences, who needs Windows and Gates?
  • Morten_SolbergMorten_Solberg Member Posts: 24
    Hi
    try this...

    Variable
    Name DataType
    TAB Char

    TAB := 9; //Char 9 = {TAB}

    IF ISCLEAR(wdApp) THEN
    IF NOT CREATE(wdApp,FALSE) THEN ERROR(ErrorText);
    wdDoc := wdApp.Documents.AddOld; //or add(-4167); //=Normal
    wdSelection := wdApp.Selection;
    wdSelection.TypeText := 'Some text' + FORMAT(TAB) + 'more text' + FORMAT(TAB);

    wdApp.ScreenUpdating(TRUE);
    wdApp.Visible := TRUE;
    wdApp.Activate;
Sign In or Register to comment.