custom toolbar item to use hyperlink to open word file

G

Guest

I have created a custom toolbar in Excel 2003 which opens instead of the
standard toolbar when I open a particular workbook. On one of the worksheets
in the workbook, I have a button that is associated with a hyperlink to a
Word file. I would like to put a button on the toolbar that will run a macro
to choose that hyperlink, rather than going to the button in the worksheet.
I've tried to record a macro to choose the worksheet button, but it doesn't
work. . . maybe because it requires a link to Word? So my question is: Is
there a way to assign a button on a customized toolbar that will create a
hyperlink a Word document?
Thanks
 
G

Guest

Something like:

Sub runword()
Dim s As String
s = "file:///c:\x.doc"
ActiveWorkbook.FollowHyperlink Address:=s
End Sub

will execute a hyperlink to a Word document. Just assign this macro to your
button.
 
G

Guest

Thank you!

Gary''s Student said:
Something like:

Sub runword()
Dim s As String
s = "file:///c:\x.doc"
ActiveWorkbook.FollowHyperlink Address:=s
End Sub

will execute a hyperlink to a Word document. Just assign this macro to your
button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top