Playing with ranges **REPOST**
From: JB (no_at_way.com)
Date: 11/03/04
- Next message: LizW: "VBA to get around character limit in UI numb. screen"
- Previous message: Jason L: "Using Find/Replace text as a variable?"
- Next in thread: Dave Lett: "Re: Playing with ranges **REPOST**"
- Reply: Dave Lett: "Re: Playing with ranges **REPOST**"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 03 Nov 2004 15:38:32 +0000
Old Post-----------
Hi Guys,
Sorry I wasn't clearer.
I'm selecting the text in the paragraph manually....say the paragraph
looked like this -
"My Paragraph has SELECTED TEXT and this is what I want to be a link
entering a new word HERE".
I've tried insertafter but it goes after the paragraph and onto the new
line when I use with myRng.MoveEnd...didn't try wdcollapseEnd though.
Dim myrng As Range
Set myrng = Selection.Range
myrng = myrng.Paragraphs(1).Range
myrng.MoveEnd
myrng.InsertAfter " MyText"
Cheers
J
---------------------
Forgot to mention that after the text is selected in the para the user
clicks a custom macro button, the macro Changes the selection to make
the selected text the anchor and inserts text before the anchor which is
the Href to the linked document.
So I can't select the whole para at the start as I'll lose my selection
and I can't select the whole para at the end as I'll lose my formatting
for the anchor.
Cheers
J
- Next message: LizW: "VBA to get around character limit in UI numb. screen"
- Previous message: Jason L: "Using Find/Replace text as a variable?"
- Next in thread: Dave Lett: "Re: Playing with ranges **REPOST**"
- Reply: Dave Lett: "Re: Playing with ranges **REPOST**"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|