A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Open and run Outlook from Excel automatically



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 1st 06, 06:05 PM posted to microsoft.public.outlook.program_vba
Am
external usenet poster
 
Posts: 17
Default Open and run Outlook from Excel automatically

I am trying to open outlook from excel with Inbox as the default folder and
use the Task to fire a reminder. In the remainder event of outlook I am
opening an excel sheet selecting some cells and sending out an email.
I am not sure if this is the best way to do it, but since I have to install
it on a corporate server, it has to fire up and send email every day I found
out that this way works with out having to install anything new.
Now, the problem is the code inside the remainder event in outlook fires and
works if the outlook is opened manually. If the outlook is opened by excel
this event does not fire.
Please advice on what might be a cause and if this is the best way of doing
what I explained above.
Thanks.
Ads
  #2  
Old November 1st 06, 10:42 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Open and run Outlook from Excel automatically

The Reminder event is most likely not firing in your Excel macro because you
haven't declared an Outlook.Application object using the With Events keyword,
which allows access to the Application.Reminder event. This event is
automatically wired up for you in the ThisOutlookSession module in the
Outlook VBA Editor, so you should probably move your reminder and Excel
handling code there.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

I am trying to open outlook from excel with Inbox as the default folder and
use the Task to fire a reminder. In the remainder event of outlook I am
opening an excel sheet selecting some cells and sending out an email.
I am not sure if this is the best way to do it, but since I have to install
it on a corporate server, it has to fire up and send email every day I found
out that this way works with out having to install anything new.
Now, the problem is the code inside the remainder event in outlook fires and
works if the outlook is opened manually. If the outlook is opened by excel
this event does not fire.
Please advice on what might be a cause and if this is the best way of doing
what I explained above.
Thanks.

  #3  
Old November 1st 06, 10:59 PM posted to microsoft.public.outlook.program_vba
Am
external usenet poster
 
Posts: 17
Default Open and run Outlook from Excel automatically

Thanks for you reply. I should have mentioned it earlier, I already put the
excel logic in to Application.Reminder event in ThisOutlookSession. The
problem comes up when i am opening outlook from excel. The event does not
fire when outlook is opened from excel. Should I be declaring Outlook object
in excel with the with events key word? I am not declaring any events in
excel.

Thanks!!

"Eric Legault [MVP - Outlook]" wrote:

The Reminder event is most likely not firing in your Excel macro because you
haven't declared an Outlook.Application object using the With Events keyword,
which allows access to the Application.Reminder event. This event is
automatically wired up for you in the ThisOutlookSession module in the
Outlook VBA Editor, so you should probably move your reminder and Excel
handling code there.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

I am trying to open outlook from excel with Inbox as the default folder and
use the Task to fire a reminder. In the remainder event of outlook I am
opening an excel sheet selecting some cells and sending out an email.
I am not sure if this is the best way to do it, but since I have to install
it on a corporate server, it has to fire up and send email every day I found
out that this way works with out having to install anything new.
Now, the problem is the code inside the remainder event in outlook fires and
works if the outlook is opened manually. If the outlook is opened by excel
this event does not fire.
Please advice on what might be a cause and if this is the best way of doing
what I explained above.
Thanks.

  #4  
Old November 1st 06, 11:36 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Open and run Outlook from Excel automatically

I can't remember of the top of my head if there are any issues with macros
not running if Outlook is automated from an external application. I'll
check, but first - why exactly do you need to run Outlook from Excel?

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

Thanks for you reply. I should have mentioned it earlier, I already put the
excel logic in to Application.Reminder event in ThisOutlookSession. The
problem comes up when i am opening outlook from excel. The event does not
fire when outlook is opened from excel. Should I be declaring Outlook object
in excel with the with events key word? I am not declaring any events in
excel.

Thanks!!

"Eric Legault [MVP - Outlook]" wrote:

The Reminder event is most likely not firing in your Excel macro because you
haven't declared an Outlook.Application object using the With Events keyword,
which allows access to the Application.Reminder event. This event is
automatically wired up for you in the ThisOutlookSession module in the
Outlook VBA Editor, so you should probably move your reminder and Excel
handling code there.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

I am trying to open outlook from excel with Inbox as the default folder and
use the Task to fire a reminder. In the remainder event of outlook I am
opening an excel sheet selecting some cells and sending out an email.
I am not sure if this is the best way to do it, but since I have to install
it on a corporate server, it has to fire up and send email every day I found
out that this way works with out having to install anything new.
Now, the problem is the code inside the remainder event in outlook fires and
works if the outlook is opened manually. If the outlook is opened by excel
this event does not fire.
Please advice on what might be a cause and if this is the best way of doing
what I explained above.
Thanks.

  #5  
Old November 1st 06, 11:56 PM posted to microsoft.public.outlook.program_vba
Am
external usenet poster
 
Posts: 17
Default Open and run Outlook from Excel automatically

The purpose of this program is to run on a corporate server each morning
where I have limited/restricted access. I have a macro which parses data and
creates a excel spreadsheet of the results. I am getting that macro to open
outlook which inturn mails out the results.
Since i am not continuously logged into that server nor am I the only user
of the server, I am using excel to automatically open outlook each morning. I
am not sure if this is the right way ... Guide me if there is some thing else
I should be doing.

I tried creating emails from excel and got a security message which I cannot
supress from the program. I tried CDO and still got the security message
asking for confirmation to send email which I could not supress.

Thanks again.

"Eric Legault [MVP - Outlook]" wrote:

I can't remember of the top of my head if there are any issues with macros
not running if Outlook is automated from an external application. I'll
check, but first - why exactly do you need to run Outlook from Excel?

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

Thanks for you reply. I should have mentioned it earlier, I already put the
excel logic in to Application.Reminder event in ThisOutlookSession. The
problem comes up when i am opening outlook from excel. The event does not
fire when outlook is opened from excel. Should I be declaring Outlook object
in excel with the with events key word? I am not declaring any events in
excel.

Thanks!!

"Eric Legault [MVP - Outlook]" wrote:

The Reminder event is most likely not firing in your Excel macro because you
haven't declared an Outlook.Application object using the With Events keyword,
which allows access to the Application.Reminder event. This event is
automatically wired up for you in the ThisOutlookSession module in the
Outlook VBA Editor, so you should probably move your reminder and Excel
handling code there.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

I am trying to open outlook from excel with Inbox as the default folder and
use the Task to fire a reminder. In the remainder event of outlook I am
opening an excel sheet selecting some cells and sending out an email.
I am not sure if this is the best way to do it, but since I have to install
it on a corporate server, it has to fire up and send email every day I found
out that this way works with out having to install anything new.
Now, the problem is the code inside the remainder event in outlook fires and
works if the outlook is opened manually. If the outlook is opened by excel
this event does not fire.
Please advice on what might be a cause and if this is the best way of doing
what I explained above.
Thanks.

  #6  
Old November 2nd 06, 02:47 AM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Open and run Outlook from Excel automatically

Key question: are you automating Excel and those macros from the Windows Task
Scheduler? If so, that's not supported:

The Outlook Object Model is unsuitable to run in a Windows service:
http://support.microsoft.com/default...en-us%3b237913

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

The purpose of this program is to run on a corporate server each morning
where I have limited/restricted access. I have a macro which parses data and
creates a excel spreadsheet of the results. I am getting that macro to open
outlook which inturn mails out the results.
Since i am not continuously logged into that server nor am I the only user
of the server, I am using excel to automatically open outlook each morning. I
am not sure if this is the right way ... Guide me if there is some thing else
I should be doing.

I tried creating emails from excel and got a security message which I cannot
supress from the program. I tried CDO and still got the security message
asking for confirmation to send email which I could not supress.

Thanks again.

"Eric Legault [MVP - Outlook]" wrote:

I can't remember of the top of my head if there are any issues with macros
not running if Outlook is automated from an external application. I'll
check, but first - why exactly do you need to run Outlook from Excel?

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

Thanks for you reply. I should have mentioned it earlier, I already put the
excel logic in to Application.Reminder event in ThisOutlookSession. The
problem comes up when i am opening outlook from excel. The event does not
fire when outlook is opened from excel. Should I be declaring Outlook object
in excel with the with events key word? I am not declaring any events in
excel.

Thanks!!

"Eric Legault [MVP - Outlook]" wrote:

The Reminder event is most likely not firing in your Excel macro because you
haven't declared an Outlook.Application object using the With Events keyword,
which allows access to the Application.Reminder event. This event is
automatically wired up for you in the ThisOutlookSession module in the
Outlook VBA Editor, so you should probably move your reminder and Excel
handling code there.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

I am trying to open outlook from excel with Inbox as the default folder and
use the Task to fire a reminder. In the remainder event of outlook I am
opening an excel sheet selecting some cells and sending out an email.
I am not sure if this is the best way to do it, but since I have to install
it on a corporate server, it has to fire up and send email every day I found
out that this way works with out having to install anything new.
Now, the problem is the code inside the remainder event in outlook fires and
works if the outlook is opened manually. If the outlook is opened by excel
this event does not fire.
Please advice on what might be a cause and if this is the best way of doing
what I explained above.
Thanks.

  #7  
Old November 2nd 06, 08:32 PM posted to microsoft.public.outlook.program_vba
Am
external usenet poster
 
Posts: 17
Default Open and run Outlook from Excel automatically

Thanks for your reply. I though that outlook cannot be run by a windows
service directly and used the excel thing to open outlook. Now that I know
that it doesnt work that way... can you pls point me in the right
direction...How this should be done?

Thanks Again !!

"Eric Legault [MVP - Outlook]" wrote:

Key question: are you automating Excel and those macros from the Windows Task
Scheduler? If so, that's not supported:

The Outlook Object Model is unsuitable to run in a Windows service:
http://support.microsoft.com/default...en-us%3b237913

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

The purpose of this program is to run on a corporate server each morning
where I have limited/restricted access. I have a macro which parses data and
creates a excel spreadsheet of the results. I am getting that macro to open
outlook which inturn mails out the results.
Since i am not continuously logged into that server nor am I the only user
of the server, I am using excel to automatically open outlook each morning. I
am not sure if this is the right way ... Guide me if there is some thing else
I should be doing.

I tried creating emails from excel and got a security message which I cannot
supress from the program. I tried CDO and still got the security message
asking for confirmation to send email which I could not supress.

Thanks again.

"Eric Legault [MVP - Outlook]" wrote:

I can't remember of the top of my head if there are any issues with macros
not running if Outlook is automated from an external application. I'll
check, but first - why exactly do you need to run Outlook from Excel?

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

Thanks for you reply. I should have mentioned it earlier, I already put the
excel logic in to Application.Reminder event in ThisOutlookSession. The
problem comes up when i am opening outlook from excel. The event does not
fire when outlook is opened from excel. Should I be declaring Outlook object
in excel with the with events key word? I am not declaring any events in
excel.

Thanks!!

"Eric Legault [MVP - Outlook]" wrote:

The Reminder event is most likely not firing in your Excel macro because you
haven't declared an Outlook.Application object using the With Events keyword,
which allows access to the Application.Reminder event. This event is
automatically wired up for you in the ThisOutlookSession module in the
Outlook VBA Editor, so you should probably move your reminder and Excel
handling code there.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

I am trying to open outlook from excel with Inbox as the default folder and
use the Task to fire a reminder. In the remainder event of outlook I am
opening an excel sheet selecting some cells and sending out an email.
I am not sure if this is the best way to do it, but since I have to install
it on a corporate server, it has to fire up and send email every day I found
out that this way works with out having to install anything new.
Now, the problem is the code inside the remainder event in outlook fires and
works if the outlook is opened manually. If the outlook is opened by excel
this event does not fire.
Please advice on what might be a cause and if this is the best way of doing
what I explained above.
Thanks.

  #8  
Old November 2nd 06, 10:40 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Open and run Outlook from Excel automatically

I'd set a reference to the Microsoft Office Excel Object Library in your
Outlook VBA Editor and move all the Excel macros there. You'll only have to
change the parts of your code that deal with creating or opening a workbook,
as those objects are referenced automatically inside Excel, but not Outlook.

You could also keep your macros in Excel, but automate running it from
Outlook:

Sub RunExcelMacro()

Dim objExcel As Object

Set objExcel = New Excel.Application

objExcel.Workbooks.Open "C:\Documents and
Settings\elegault\Desktop\Book1.xls"
objExcel.Run "Macro1"
objExcel.Workbooks.Close
objExcel.Quit
Set objExcel = Nothing
End Sub

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

Thanks for your reply. I though that outlook cannot be run by a windows
service directly and used the excel thing to open outlook. Now that I know
that it doesnt work that way... can you pls point me in the right
direction...How this should be done?

Thanks Again !!

"Eric Legault [MVP - Outlook]" wrote:

Key question: are you automating Excel and those macros from the Windows Task
Scheduler? If so, that's not supported:

The Outlook Object Model is unsuitable to run in a Windows service:
http://support.microsoft.com/default...en-us%3b237913

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

The purpose of this program is to run on a corporate server each morning
where I have limited/restricted access. I have a macro which parses data and
creates a excel spreadsheet of the results. I am getting that macro to open
outlook which inturn mails out the results.
Since i am not continuously logged into that server nor am I the only user
of the server, I am using excel to automatically open outlook each morning. I
am not sure if this is the right way ... Guide me if there is some thing else
I should be doing.

I tried creating emails from excel and got a security message which I cannot
supress from the program. I tried CDO and still got the security message
asking for confirmation to send email which I could not supress.

Thanks again.

"Eric Legault [MVP - Outlook]" wrote:

I can't remember of the top of my head if there are any issues with macros
not running if Outlook is automated from an external application. I'll
check, but first - why exactly do you need to run Outlook from Excel?

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

Thanks for you reply. I should have mentioned it earlier, I already put the
excel logic in to Application.Reminder event in ThisOutlookSession. The
problem comes up when i am opening outlook from excel. The event does not
fire when outlook is opened from excel. Should I be declaring Outlook object
in excel with the with events key word? I am not declaring any events in
excel.

Thanks!!

"Eric Legault [MVP - Outlook]" wrote:

The Reminder event is most likely not firing in your Excel macro because you
haven't declared an Outlook.Application object using the With Events keyword,
which allows access to the Application.Reminder event. This event is
automatically wired up for you in the ThisOutlookSession module in the
Outlook VBA Editor, so you should probably move your reminder and Excel
handling code there.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"AM" wrote:

I am trying to open outlook from excel with Inbox as the default folder and
use the Task to fire a reminder. In the remainder event of outlook I am
opening an excel sheet selecting some cells and sending out an email.
I am not sure if this is the best way to do it, but since I have to install
it on a corporate server, it has to fire up and send email every day I found
out that this way works with out having to install anything new.
Now, the problem is the code inside the remainder event in outlook fires and
works if the outlook is opened manually. If the outlook is opened by excel
this event does not fire.
Please advice on what might be a cause and if this is the best way of doing
what I explained above.
Thanks.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can rules be run part of the day automatically gedsons Outlook - Installation 1 October 4th 06 04:19 PM
Rule works when run manually but not automatically Gregory A. Miller Outlook - Installation 0 September 17th 06 08:15 PM
Rules run manually but not automatically MC Outlook - General Queries 0 June 20th 06 07:33 PM
Rules run manually but not automatically [email protected] Outlook - General Queries 0 June 14th 06 01:33 AM
Rule doesn't run automatically [email protected] Outlook - General Queries 5 January 24th 06 04:21 PM


All times are GMT +1. The time now is 08:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.