Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default set outlook task through excel

Hi,
I have adapted some code I found in JP site on setting outlook tasks through
excel.
I now make it happen on a change event however I have the following doubt.

Am I right in thinking the following code checks if outlook is open and
otherwise opens it. Because I get an error message when I run the code and
outlook is closed.

On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
If Err.Number < 0 Then
Set olApp = CreateObject("Outlook.Application")
End If
On Error GoTo 0

On the other hand if I add the following line after "End If"
olApp.Session.Logon
then I don't get the error message and although I don't see outlook opening
I do find the task when I open it manually.
Can someone please explain the above?
Thanks.
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 create an Outlook task from Excel Gaetano Liberto Excel Programming 1 November 3rd 08 02:46 PM
Creating task in outlook from a particular row in excel [email protected] Excel Programming 1 January 28th 08 11:11 PM
Excel to Schedule Task in Outlook ryguy7272 Excel Programming 1 January 25th 08 06:44 PM
Creating Outlook Task from Excel Bugman Excel Programming 0 January 17th 08 02:26 PM
Searching for an Outlook Task from Excel scott56hannah Excel Programming 6 October 10th 07 01:05 PM


All times are GMT +1. The time now is 07:48 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"