Simpatie.ro - matrimoniale
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
bella_sexy la Simpatie.ro
Femeie
25 ani
Bucuresti
cauta Barbat
27 - 48 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[WORD] Hyperlink Current Paragraph to Top of the Document [VBA]

Pagini: 1 Moderat de TRaP, TonyTzu
#1
TRaP
Moderator
Postari: 960
The following snippet will hyperlink the current paragraph (where the cursor is) to the top of the document:


Sub HLNK_Top()
Dim rng As Range
Set rng = Selection.Paragraphs(1).Range
    rng.SetRange rng.Start, rng.End - 1
   
    ActiveDocument.Hyperlinks.Add Anchor:=rng, Address:="", _
        SubAddress:="_top", ScreenTip:="", TextToDisplay:=rng.Text
End Sub


If you have many paragraphs to add this hyperlink to, simply put the macro as a button in your Quick Access Toolbar, like 1st from the left, then pressing ALT+1 will automatically run the macro.


 
   
Pagini: 1  
Mergi la