General information
Category:
COM/DCOM and OLE Automation
>>>FWIW, using Office 2003, and its help is nearly worthless. There's close to zero information on how to anchor a canvas - except that the last parameter should be a range to anchor to. Well, it can't be just about any range, it needs to be document.selection (at least nothing else worked so far). Now I only need to find a way to not select the whole paragraph... or to just sacrifice an empty one.
>>
>>Is there a way to select "nothing" - i.e. an empty range, or a range where the start and stop are the same? The same idea as an actual Word document - you can have a current insertion point without any text or graphics being selected.
>
>Yeah, got that too:
>
>oWd.Selection.Range.SetRange(owd.selection.range.end, owd.selection.range.end)
>
>pretty much selects the point after the last character. Though I'm not quite sure that this works, because it's still eating my last paragraph. Maybe it needs another .Select at the end of the line - next thing to try.
>
>Nope, doesn't do anything. This does:
>
>owd.selection.range.characters(owd.Selection.Range.Characters.Count).Select
>
>selects the last character. As close to nothing as it gets. The .selection.range.start and .end seem to be read only - no error if I try to change them, but no effect either.
Work on Range, not Selection (always). For this problem, they the Collapse method.
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only