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:
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!
Bookmarks