Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2018, 11:01 AM
d4okeefe d4okeefe is offline Hyperlink Shortcuts using pdfs Windows 10 Hyperlink Shortcuts using pdfs Office 2016
Advanced Beginner
 
Join Date: Apr 2013
Posts: 77
d4okeefe is on a distinguished road
Default

I looked around, and I don't think there's a way change the default directory in the Edit Hyperlink dialog, which is frustrating.



One thing I've done in the past is add generic hyperlinks, then edit the fields manually. For example, if the text in your document to which your adding links contains a consistent phrase, like ".pdf", you could add generic links with the following.

Code:
Sub add_generic_links()
    Dim r As Range, r1 As Range
    Set r = ActiveDocument.Content
    With r.Find
        .ClearFormatting
        .Text = ".pdf"
        Do While .Execute
            Set r1 = r.Duplicate
            r1.MoveStart wdCharacter, -1
            r1.Expand wdWord
            ActiveDocument.Hyperlinks.Add r1, "c:\scratch"
        Loop
    End With
End Sub
Type Alt-F9 to view the hyperlinks, and you'll see something like this:
{ HYPERLINK "c:\\scratch" }
You can edit the directory from there.

Sorry there isn't an easier way.
Reply With Quote
Reply

Tags
hyperlink



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink: open the document only once, quit & reopen PP, hyperlink doesnt work anymore quanghuynguyenhua PowerPoint 0 10-10-2015 06:17 PM
Hyperlink Format varies, depending on whether Target file was saved or unsaved on Hyperlink Copy RichardDavey Word 0 05-26-2015 05:26 PM
Hyperlink Shortcuts using pdfs Can't Insert PDFs into PPT ensta PowerPoint 1 03-14-2015 07:26 AM
Hyperlink Shortcuts using pdfs Splitting Out PDFs 4mysanity Word VBA 27 12-05-2012 03:31 PM
Inserting PDFs into Word Rob Roy Word 2 01-04-2011 03:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft