我的默认浏览器设置为Firefox,但是我想在IE(全屏)的幻灯片幻灯片中打开超链接。 我使用了以下宏:
Sub hyperlink()
sCmd = """C:\Program Files\Internet Explorer\iexplore.exe"" " _
& "http://www.google.com/"
Shell sCmd
End Sub
当我点击超链接时,它会在IE中打开网站,但在后台。我仍然要退出Powerpoint。是否有可能在全屏模式下立即打开链接?
答案 0 :(得分:1)
可以使用-k开关
尝试使用Internet Explorer的kiosk模式但是PowerPoint仍然会打开并退出自助服务终端模式,您需要使用Alt-F4
此代码还应将IE带到前台
Public Declare PtrSafe Function FindWindow% Lib "user32" Alias "FindWindowA" _
(ByVal lpclassname As Any, _
ByVal lpCaption As Any)
Public Declare PtrSafe Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, _
ByVal y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal wFlags As Long) As Long
Global Const HWND_TOPMOST = -1
Global Const SWP_NOSIZE = &H1
Global Const SWP_NOMOVE = &H2
Sub hyperlink()
sCmd = """C:\Program Files\Internet Explorer\iexplore.exe"" -k " _
& "http://www.google.com/"
Shell sCmd
hwnd% = FindWindow%("Internet Explorer", 0&)
Call SetWindowPos(hwnd%, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE)
End Sub
在Win 10 x64,PowerPoint 2013& IE11