Opening Outlook from Excel VBA

P

Project manager

I'm trying to setup a command/macro in an Excel VBA file that would allow me
to send email from my Excel file. When I press on the command button the VBA
syntax page opens than Excel freezes. I use the following in order to go and
get Outlook. Is this right? Any idea why Excel would freeze?

Dim OLF As Outlook.MAPIFolder, olMailItem As Outlook.MailItem
Dim ToContact As Outlook.Recipient

Thanks to anyone who can help me out!
 
G

Gary''s Student

if you enter something like this in a cell and click on it Outlook will open:

mailto:[email protected]

or from VBA:

Sub Macro1()
x = Shell("C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE",
vbMaximizedFocus)
End Sub
 
P

Project manager

Hi,

I'll try it and let you know.

PM

Gary''s Student said:
if you enter something like this in a cell and click on it Outlook will open:

mailto:[email protected]

or from VBA:

Sub Macro1()
x = Shell("C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE",
vbMaximizedFocus)
End Sub
 

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