locked
I'm having trouble running a VBA macro in Word (Office 2016) on MacOS RRS feed

  • Question

  • Hi all,

    I'm having issues running a VBA Macro on Office 2016 on a 64 bit Mac OS machine. The VBA code looks like this

    Public Declare PtrSafe Function system Lib "libc.dylib" (ByVal command As String) As LongPtr
     
    Sub autoopen()
        Safari
    End Sub
     
    Sub Safari()
        Dim result As Long
        Set result = system("open -a Safari --args http://www.google.com")
        Debug.Print Str(result)
       
    End Sub

    I'm getting an error stating that libc.dylib can't be found. I've tried defining the path explicitly and the result is the same. Any ideas of what might be going on? 

    Monday, June 18, 2018 7:38 PM