Accessing Modules in other applications

B

Brad

Good morning.

Is there a way to access a Module's procedures in Outlook
from Excel?

The equivalent of:

Dim Outlook as Outlook.Application
set Outlook = GetObject(,"Outlook.Application")

Outlook.Module1.SendMail strName, strSubject, strMessage

Where sendmail creates a mailitem and sends it?

This is a bad example as you can easily do that from
Excel, but is there a way to access a module in another
application?

Thanks in advance.

-Brad
 
J

jaf

Sould be Outlook.Run SendMail strName, strSubject, strMessage
Or Outlook.Application.Run ...

FYI using Outlook as the object prefix is asking for trouble.

If your looking for some code. Take a look here.
http://www.rondebruin.nl/sendmail.htm


--
John
johnf 202 at hotmail dot com


| Good morning.
|
| Is there a way to access a Module's procedures in Outlook
| from Excel?
|
| The equivalent of:
|
| Dim Outlook as Outlook.Application
| set Outlook = GetObject(,"Outlook.Application")
|
| Outlook.Module1.SendMail strName, strSubject, strMessage
|
| Where sendmail creates a mailitem and sends it?
|
| This is a bad example as you can easily do that from
| Excel, but is there a way to access a module in another
| application?
|
| Thanks in advance.
|
| -Brad
 
A

Alex Ivanov

Brad,

If it is a Class module, then you should be able to access it's public
methods/properties.
If it's a standard module, then probably not. I did not try either with OL
though, so I may be wrong.

Alex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top