J
JB
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
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