My latest project has me looking to try and get a count from a mailbox I am delegated for access on. Since I am not able to add in the mailbox to my profile (do not have full access) and have listed on the left side of the Outlook screen I need to go into File option, Open & Export, Other Users Folders to open the other person inbox. I was trying to see if I could use a VBA for this and pull back data on the mailbox. Since I don’t have the users inbox listed on the profile and I cannot find a ‘fast path’ way to opening this option I was going to use Send Key. However I cannot seem to get the Send Keys to work in outlook. Anyone have any ideas on this? Here is the code I have started but get an error, Run-time error 438, object doesn’t support the property or method. Is it possible to use Send Keys or can I use another method to get the user inbox opened?
Sub sendkey()
Dim objOutlook As Object
Dim objnSpace As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objnSpace = objOutlook.GetNamespace("MAPI")
objOutlook.SendKeys "%{F}"
End Sub
Sub sendkey()
Dim objOutlook As Object
Dim objnSpace As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objnSpace = objOutlook.GetNamespace("MAPI")
objOutlook.SendKeys "%{F}"
End Sub