PC Review


Reply
Thread Tools Rate Thread

Call Excel Macro from Outlook

 
 
sjstewart1981@yahoo.co.uk
Guest
Posts: n/a
 
      21st Nov 2007
Hi
How do you call an excel macro from Outlook? I have an excel macro
that relies on an email I get everyday, so I have a macro in Outlook
that copies the excel attachment to a certain folder. I would then
like that macro to open up a workbook in Excel that has my macro in
and autorun it without me having to open it manually. Is this
possible?

Thanks,
Simon

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2hhcmxlcyBDaGlja2VyaW5n?=
Guest
Posts: n/a
 
      21st Nov 2007
Simon, try something like this:
Sub CallExcelMacro()
Dim eApp As Excel.Application
'Note: Must have set reference to:
'Microsoft Excel 11.0 Object Library
'This is accessed in the VBE Editor
'Under Tools -> References...
Set eApp = GetObject(,"Excel.Application") 'Assumes Excel is open,
'Use CreateObject if Excel is not open.
eApp.Run "HelloWorld" 'Runs the subroutine name "HelloWorld"
End Sub

Let me know if you have problems.

--
Charles Chickering

"A good example is twice the value of good advice."


"(E-Mail Removed)" wrote:

> Hi
> How do you call an excel macro from Outlook? I have an excel macro
> that relies on an email I get everyday, so I have a macro in Outlook
> that copies the excel attachment to a certain folder. I would then
> like that macro to open up a workbook in Excel that has my macro in
> and autorun it without me having to open it manually. Is this
> possible?
>
> Thanks,
> Simon
>
>

 
Reply With Quote
 
sjstewart1981@yahoo.co.uk
Guest
Posts: n/a
 
      22nd Nov 2007
Brilliant thanks Charles, I will try it out and let you know how i get
on! Simon

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call Outlook from Excel macro Tracey Microsoft Excel Programming 1 16th Sep 2009 04:10 AM
Re: Excel Macro call Word Macro with Parameters =?Utf-8?B?Q3VydA==?= Microsoft Excel Programming 0 24th May 2007 12:21 AM
Call macro stored in Excel workbook from Outlook's macro =?Utf-8?B?R3ZhcmFt?= Microsoft Excel Programming 0 4th Oct 2006 05:47 PM
Call macro stored in Excel workbook from Outlook's macro =?Utf-8?B?R3ZhcmFt?= Microsoft Outlook VBA Programming 5 4th Oct 2006 06:26 AM
Call Excel 2002 Macro from Outlook 2002 Reto Walker Microsoft Outlook VBA Programming 1 10th May 2004 02:26 PM


Features
 

Advertising
 

Newsgroups
 


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