![]() |
#6
|
||||
|
||||
![]()
Put the cursor in the first line of the link text and run the following to hyperlink that text.
Code:
Sub Macro1() Dim oRng As Range Dim sLink As String Selection.HomeKey Set oRng = Selection.Range oRng.MoveEndUntil Chr(11) sLink = oRng.Text oRng.Hyperlinks.Add oRng, sLink End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
getfromclipboard, hyperlink, macro error |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
et_33 | Excel Programming | 8 | 10-11-2022 06:24 AM |
WORD MACRO COPY/PAST from clipboard | rachidlea | Word VBA | 0 | 11-16-2021 09:38 AM |
Macro for copying in clipboard more than one selected text | ghostwhisperer86 | Outlook | 0 | 03-31-2019 07:47 AM |
![]() |
poetofpiano | Word VBA | 8 | 02-18-2018 07:17 PM |
Add Hyperlink in Visio that when clicked copies something to your clipboard | MoHyB | Visio | 0 | 11-10-2017 08:55 AM |