R
Robert
I have written my first long(ish) subroutine and
everything works correctly except for a few lines which
generate Compile errors whichever way I try to write them.
I need to insert a short, centred title at the very top
of (at this stage) an otherwise empty document. I need to
insert one empty line (Paragraph) after it and finish by
aligning it Left ready for the next lot of text.
If I position the IP using ActiveDocument.Paragraphs(1),
then I cannot use InsertBefore/After to insert the Title.
Similarly, if I use ActiveDocument.Range(0,0).Select,
then I cannot use Alignment = wdAlign... to position the
Title. TypeText also doesn't work with the particular
combinations I have tried. I am very confused.
Could some kind person show me a few lines of code to
achieve this. I should be most grateful.
everything works correctly except for a few lines which
generate Compile errors whichever way I try to write them.
I need to insert a short, centred title at the very top
of (at this stage) an otherwise empty document. I need to
insert one empty line (Paragraph) after it and finish by
aligning it Left ready for the next lot of text.
If I position the IP using ActiveDocument.Paragraphs(1),
then I cannot use InsertBefore/After to insert the Title.
Similarly, if I use ActiveDocument.Range(0,0).Select,
then I cannot use Alignment = wdAlign... to position the
Title. TypeText also doesn't work with the particular
combinations I have tried. I am very confused.
Could some kind person show me a few lines of code to
achieve this. I should be most grateful.