Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Speeding up Word Automation using Ranges?!? 1

Status
Not open for further replies.

ftpdoo

Programmer
Aug 9, 2001
202
GB
I'm using MS Word to generate reports. Currently I'm using:

oWord.Selection.TypeText "My text...." to diplay information, but i've heard that using ranges are quicker.

How do I do this?? I've been told:

MyRange.InsertAfter "My Text...." but I don't have the property MyRange?

Thanks,
Jonathan (PS i'm using word 97)
 
ftpdoo,

The MyRange expression can be anything that returns either a selection or a range. So, in your case you can just continue to use the 'selection' object like this:

Selection.InsertAfter Text:="My Text...."

Hope this helps,

wadjssd
 
do you know if this will provide any additional speed advantage??

Thanx,
Jonathan
 
Hmmm, not sure. If it does, I can't see that the gains would be enough to be noticable. Maybe I'll go and have a play.....

wadjssd
 
Thanks for all you help!
Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top