+ Reply to Thread
Results 1 to 2 of 2

Enable all hyperlinks to call a macro code

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2016
    Posts
    12

    Exclamation Enable all hyperlinks to call a macro code

    Currently I am constructing an MS Excel file to act as a standard letters template index which will allow all staff members to open letter templates from the one location. All was going great until I realised that when I click a hyperlink leading to a .dot file (MS Word template), it actually opens the .dot file itself instead of opening a new .doc template.

    Seemingly, the problem is that hyperlinks don't work the same way in Excel as in Windows Explorer. In Windows Explorer, through the registry, there are at least two "actions" assigned to the .dot, .dotx, and .dotm extensions: "New" and "Open". The "New" action causes Word to create a new document based on the template, while the "Open" action causes Word to open the template itself. The default action (when you double-click in Windows Explorer) is "New". If you want "Open" you have to right-click the icon and choose it from the menu.

    None of this has any effect on hyperlinks, whether within Excel or in Internet Explorer. You would see the same behavior if you put a hyperlink to a template into an HTML page and clicked it in IE or Firefox - the hyperlink only knows about "Open".

    In trying to find a solution, I've come across the following code a couple of times:
    Please Login or Register  to view this content.
    My problem now lies in calling the VBA code to action. Is there any way to have all hyperlinks in the document (or all within a set range) call this code, perhaps using an 'onclick' function? I should point out that I'm fairly new to macros and VBA code, so please be gentle with me. ^^

    If anyone can help me with this dilema, I would very much appreciate it!

  2. #2
    Registered User
    Join Date
    06-12-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2016
    Posts
    12

    Re: Enable all hyperlinks to call a macro code

    Any ideas...?

    Everyone I've asked so far says it should be possible, but the just don't know how. Rushing headlong towards a deadline with no resolution in sight. >.<

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1