ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   custom toolbar item to use hyperlink to open word file (https://www.excelbanter.com/excel-discussion-misc-queries/140418-custom-toolbar-item-use-hyperlink-open-word-file.html)

Sally M

custom toolbar item to use hyperlink to open word file
 
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

Gary''s Student

custom toolbar item to use hyperlink to open word file
 
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.
--
Gary''s Student - gsnu200717


"Sally M" wrote:

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


Sally M

custom toolbar item to use hyperlink to open word file
 
Thank you!

"Gary''s Student" wrote:

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.
--
Gary''s Student - gsnu200717


"Sally M" wrote:

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



All times are GMT +1. The time now is 08:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com