What is a Range object?

D

David Thielen

Hi;

I've been playing with this today and it looks like a Range object knows
what underlying item it is a Range in - main document or a specific
header/footer. Is that correct?

If so, how can I get that underlying object from the Range?

What I am doing now is I get the Selection.Range and call Duplicate on the
Range object to create a new Range object. I then set the Start and End
values on the new Range object. Is this a good way to get a Range object in
the selected doc that I can change without affecting the selected range?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
W

Wei Lu [MSFT]

Hello Dave,

Here is what I found in the helps for the Range object.

You can use the Duplicate property to pick up the settings of all the
properties of a duplicated Font, LetterContent, or ParagraphFormat object.
You can assign the object returned by the Duplicate property to another
object of the same type to apply those settings all at once. Before
assigning the duplicate object to another object, you can change any of the
properties of the duplicate object without affecting the original.

By duplicating a Range object, you can change the starting or ending
character position of the duplicate range without changing the original
range.

Hope this helps.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hello Dave,

You may consider to use the VBA helper.

By default, it located at C:\Program Files\Microsoft Office\OFFICE11\1033\
named VBAWD10.CHM

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hello Dave,

The Range object did not provide content it in. You may need to track the
content before you use the Range object.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hi ,

How is everything going? Please feel free to let me know if you need any
assistance.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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