I will try to be as clear as possible. There are 5 people on my team. We each have our own personal outlook email accounts. Our team leader is ALSO the owner of an account that we all have access to (call it "SharedAccount@xx.com"). I have macros that I want to put into that shared email account, that will listen to the inbox of that email account and do stuff with the incoming messages. Since I am not the owner of that account, I wrote Macros in my personal email and for the NameSpace business I used the following code (note, again, this is in MY personal email ThisOutlookSession):
Dim objNS As Outlook.NameSpace
Set objNS = olApp.GetNamespace("MAPI")
Dim rec As recipient
Set rec = objNS.CreateRecipient("SharedAccount@xx.com")
rec.Resolve
Set inbox = objNS.GetSharedDefaultFolder(rec, olFolderInbox)
Am I doing this wrong? Do I instead need to put this code into the macros on the "Shared@xx.com" account profile? I know the macros work in regards to the listeners and all that, so the problem has something to do with NameSpaces I feel like. I would really, really appreciate any help I can get. Thank you!