0

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!

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
gcc
  • 283
  • 1
  • 3
  • 14
  • Also I want any one of our team members to be able to drag items into folders of the SharedAccount, where the folders will do stuff to the items. Does this mean i have to put the macros in every one of my team memebers' personal emails? Or is there one place I can put the macros that gives everyone this functionality? Once again thank you ! – gcc Aug 30 '13 at 20:51

1 Answers1

0

Each user normally accesses their own VbaProject.otm file. See VbaProject.OTM deployment for a description of "a parameter altvba that allows to specify another path to run the OTM file from".

If that is not feasible you could use one of the methods described here. http://www.outlookcode.com/article.aspx?id=28 also referenced in the above.

  1. "The least intrusive technique is to use the File | Export command in the Outlook VBA environment to export modules as .bas, .cls, and .frm files."

  2. "The brute force approach is to copy this file from the machine where the macros were written to other users' machines, replacing any existing VbaProject.otm file." (Not very nice.)

It is easiest for me to send a mail, then paste the text into their editor.

Community
  • 1
  • 1
niton
  • 8,771
  • 21
  • 32
  • 52