Creating simple text in the document file

  • Thread starter Thread starter mezzanine1974
  • Start date Start date
M

mezzanine1974

my question is very basic. Which code should I use to create a text
(string) in a specific point of the document? Say that, code will
create the text "HELLO" to the 12th line of the *.DOC file.
Thanks
 
Selection.InsertBefore "HELLO"

will insert the word at the location of the Selection. Lines however do not
have much significance in Word as the layout of the document and hence the
linebreaks is determined by the printer that is the active printer and it
can change from one printer to another.

You should investigate the use of the Range object as a more precise method
of controlling where your text is inserted.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

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

Back
Top