[AHK]在Excel中用热键创建超链接

189 篇文章 4 订阅
105 篇文章 5 订阅

Hyperlink in Excel 2010 using COM?

https://autohotkey.com/board/topic/72914-hyperlink-in-excel-2010-using-com/


F1::	; example 1:设置Excel的热链接

oExcel := ComObjActive("Excel.Application")
filePath:="X:\ahk\excel\Picture.png"
oExcel.ActiveSheet.Hyperlinks.Add(oExcel.ActiveCell,filePath,"","Click here to see Picture","Picture")
return

F2::	; example 2: http://www.autohotkey.com/forum

oExcel := ComObjActive("Excel.Application")
oExcel.ActiveSheet.Hyperlinks.Add(oExcel.ActiveCell, "http://www.autohotkey.com/forum","","Click here to visit Autohotkey forum","Autohotkey forum")
return

F3:: 
html=http://www.autohotkey.com/forum
text=Click here to visit
Hyper1 = =hyperlink("%html%","%text%")
xl :=   ComObjActive("Excel.Application")
xl.ActiveCell.Formula :=   Hyper1
return


F4:: 
html:="X:\ahk\excel\Picture.png"
text=Click here to visit
Hyper1 = =hyperlink("%html%","%text%")
xl :=   ComObjActive("Excel.Application")
xl.ActiveCell.Formula :=   Hyper1
return


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值