Home Products Tips VBA OfficeOne on Windows Links

OpenURL

The following VBA code snippet shows how to open a URL in Safari on Mac OS X:

Sub OpenURL(ByVal URL As String)
    Dim S As String

    S = "tell application ""Safari""" + vbCrLf + _
        "open location """ + URL + """" + vbCrLf + _
        "end tell"
    MacScript S
End Sub

Sub Test()
    OpenURL "http://www.officeonemac.com/"
End Sub


Home | Products | Tips | VBA | Windows | Links

Contact OfficeOne on email at officeone@officeonemac.com. Copyright © 2001-2013 OfficeOne. All rights reserved.

page counter