1

I'm an experienced Excel VBA programmer, who is trying to write a macro in Excel that uses functions and subs in Outlook. I've done some searching and found that the standard answer looks something like:

objApp = CreateObject("Outlook.Application")
call objApp.UserSubName(argument1, argument2)

where UserSubName is the name of the sub in Outlook. I've seen several minor variations on this, and in the comments after each one, there is usually at least one poster who writes "This didn't work for me." I'm trying to understand the problem better, so while I'll happily take an answer to why this isn't working, the real question I'm asking is:

Is a user-written sub or function placed in the object model hierarchy? In other words, can I "drill down" to the sub or function with "Application.something.somethingelse.UserSubName"? Any feedback on this would be appreciated!

jwolter
  • 11
  • 2
  • I think if you put the procedure into ThisOutlookSession, and make it Public, you should be able to do that. – JimmyPena Jun 26 '12 at 17:55

1 Answers1

0

No, you cannot do that in Outlook.

Dmitry Streblechenko
  • 56,873
  • 3
  • 44
  • 75