PC Review


Reply
Thread Tools Rate Thread

Creating simple text in the document file

 
 
mezzanine1974
Guest
Posts: n/a
 
      6th Aug 2007
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

 
Reply With Quote
 
 
 
 
Doug Robbins - Word MVP
Guest
Posts: n/a
 
      7th Aug 2007
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

"mezzanine1974" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a simple text file Jeff Granger Microsoft Excel Discussion 1 11th Jun 2007 03:18 PM
Simple text document problem? Paul Graham Windows Vista General Discussion 2 2nd May 2007 07:00 PM
Creating simple Excel file Eric Johannsen Microsoft C# .NET 2 29th Jun 2004 06:20 PM
Re: Creating simple Excel file geoff davison Microsoft C# .NET 0 29th Jun 2004 04:01 PM
Correcting text in a simple word document =?Utf-8?B?S3Jpc3RlbiBJbm1hbg==?= Microsoft Word Document Management 2 5th Feb 2004 10:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:40 PM.