Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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!


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop opening outlook in excel bill s Excel Discussion (Misc queries) 2 September 23rd 09 10:16 PM
Opening outlook in Excel chrisnsmith Excel Discussion (Misc queries) 1 February 28th 09 02:46 AM
Opening Excel Files from Outlook Marilyn Excel Discussion (Misc queries) 4 October 23rd 06 03:18 PM
Excel opening outlook emails Lime Excel Programming 1 October 5th 06 05:33 PM
Excel Attachments not opening in Outlook gish Excel Discussion (Misc queries) 1 June 6th 06 09:49 PM


All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"