how to control margin in word automation

sendohsendoh Member Posts: 207
Hi Experts,

I try to control the margin of MSword but it seems it didn't work. I run macro on word and the code is this for margin.
    With Selection.ParagraphFormat
        .LeftIndent = InchesToPoints(0.38)
        .SpaceBeforeAuto = False
        .SpaceAfterAuto = False
    End With
which is simple to understand, and i tried this in NAV with the ff. code
       wSel.TypeText(vFieldText);
       wSel.ParagraphFormat.LeftIndent := 0.38
       wSel.ParagraphFormat.SpaceBeforeAuto := 0;
       wSel.ParagraphFormat.SpaceAfterAuto := 0;
and yet nothings happen..

Please help, BTW I use NAV5sp1 with MSWord2007. Thanks in Advance [-o<

Best regards,
Sendoh
Sendoh
be smart before being a clever.

Comments

  • sendohsendoh Member Posts: 207
    Follow up.. [-o<
    Sendoh
    be smart before being a clever.
Sign In or Register to comment.