Text at the edge of the page

K

Kumar

Hello,

I would like to insert through VBA, one line of text at the edge of
the page (last line from the top margin). Let's say I need to insert
this text as the last possible line in the word document, from top
edge of the page. I want the line of text to be just above the edge of
the page, last possible line in that document.

How do I do it through Vba?

Thanks
Kamur
 
D

Doug Robbins - Word MVP

Hi Mumar,

I do not really understand what you are trying to do, but maybe this is it:

ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.Insertfter
vbCr & "yourtext"

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
K

Kumar

Thanks Doug for the code snippet...It does exactly what I was
asking,ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary).Range.InsertAfter
vbCr & "text"

Only thing is I dont want it to be footer..Is it possible to make the
text normal? I have the bottom margin of my page set to .01". I was
able to navigate to the edge and was able to enter text manually...So,
was wondering if this code can be modified to insert the text as
normal instead of footer.

Thanks again,
Kamur
 
D

Doug Robbins - Word MVP

Hi Kumar,

The footer is the obvious and correct thing to use for this purpose. The
position of text will then be unaffected by anything that is done
in the main body of the document.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top