Tony
Mon May 12 09:57:53 PDT 2008
I'm not entirely sure what you want. This is a Word group so do you want to
know how to create a hyperlink in Word VBA. If so, try this:
(range_reference).Hyperlinks.Add Anchor:=Selection.Range, _
Address:="
http://www.example.com", TextToDisplay:="Example text"
If you want to copy a hyperlink to the clipboard, then this:
(range_reference).Hyperlinks(1).Range.Copy
If you want to conjure the hyperlink out of thin air and on to the clipboard
without an intermediate step, I'm not sure that can be done.
Or are you actually in Outlook? And if so, what version?
--
Enjoy,
Tony
<ryanmhuc@yahoo.com> wrote in message
news:b8bc3dd8-b1a0-46a8-bafc-9698e6f65708@j22g2000hsf.googlegroups.com...
On May 12, 6:26 am, "Tony Jollans" <My forename at my surname dot com>
wrote:
> Copy (and Paste) will copy a hyperlink along with any displayed text. If
> your problem is really just that you want text and address to be different
> in the first place, use the hyperlinks dialog - you don't say what version
> of Word you are using but placing the insertion point in the hyperlink and
> pressing Ctrl+K works in all versions.
>
> --
> Enjoy,
> Tony
>
> <ryanm...@yahoo.com> wrote in message
>
> news:c87a3daa-f5ca-4b02-ae37-797058dc8081@m36g2000hse.googlegroups.com...
>
>
>
> > Is it possible to create a hyperlink and place this in the clipboard
> > so you can paste it into an Outlook email. I know i can do something
> > like this
>
> > "<file:///E:\Profile\Desktop\dropbox\sharepoint.docx>"
>
> > And then after a return it will hyperlink. But i would like the link
> > and the text to be different.- Hide quoted text -
>
> - Show quoted text -
Tony thanks for the suggestion but I'm asking how you accomplish this
in VBA. Obivously using the copy and paste from the keyboard will work
but how do you create the same affect using VBA and the clipboard