Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Call Excel Macro from Outlook

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Call Excel Macro from Outlook

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."


" 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Call Excel Macro from Outlook

Brilliant thanks Charles, I will try it out and let you know how i get
on! Simon

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
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
Excel Macro call Word Macro with Parameters Bill Sturdevant[_2_] Excel Programming 9 May 24th 07 12:21 AM
Call macro stored in Excel workbook from Outlook's macro Gvaram Excel Programming 0 October 4th 06 05:47 PM
call .DOC from an Excel VBA macro ? Ayato Excel Programming 1 December 1st 03 11:26 PM


All times are GMT +1. The time now is 07:38 AM.

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

About Us

"It's about Microsoft Excel"