ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening Outlook from Excel VBA (https://www.excelbanter.com/excel-programming/389871-opening-outlook-excel-vba.html)

Project manager

Opening Outlook from Excel VBA
 
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!



Ron de Bruin

Opening Outlook from Excel VBA
 
Hi Project manager

See this page for example code
http://www.rondebruin.nl/sendmail.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Project manager" <Project wrote in message
...
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!




Gary''s Student

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



or from VBA:

Sub Macro1()
x = Shell("C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE",
vbMaximizedFocus)
End Sub
--
Gary''s Student - gsnu200723


"Project manager" wrote:

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!



Project manager[_2_]

Opening Outlook from Excel VBA
 
Hi Ron,

Thanks for the info. I'll try it.

Regards,

Project manager

"Ron de Bruin" wrote:

Hi Project manager

See this page for example code
http://www.rondebruin.nl/sendmail.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Project manager" <Project wrote in message
...
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!





Project manager[_2_]

Opening Outlook from Excel VBA
 
Hi,

I'll try it and let you know.

PM

"Gary''s Student" wrote:

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



or from VBA:

Sub Macro1()
x = Shell("C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE",
vbMaximizedFocus)
End Sub
--
Gary''s Student - gsnu200723


"Project manager" wrote:

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!




All times are GMT +1. The time now is 02:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com