IE automation via Outlook - Permission Denied issues
问题 Sub test() Dim objShell As Object Dim objShellWindows As Object Dim objWin As Object Set objShell = CreateObject("Shell.Application") Set objShellWindows = objShell.Windows For Each objWin In objShellWindows If TypeName(objWin.Document) = "HTMLDocument" Then Debug.Print objWin.Document.Location End If Next objWin End Sub This works perfectly fine in Excel, Access, Word and PowerPoint, but throws "Run-Time error 70 - Permission Denied" error on the Debug.Print line when ran from Outlook. I'm