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

Can I automatically make appointments into tasks also?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 20th 06, 10:39 AM posted to microsoft.public.outlook.program_vba
Duncan McC
external usenet poster
 
Posts: 56
Default Can I automatically make appointments into tasks also?

A guy posted a Q in the .calendaring NG (see below) - and I'm wondering
now if it can indeed be done (fire off the Save Event - if such a thing
exists)...

Subject: Can I automatically make appointments into tasks also?
From: Duncan McC
Newsgroups: microsoft.public.outlook.calendaring
Date: Thu, 16 Mar 2006 21:32:49 +1300

In article ,
says...
I want to have my appointments automatically become a task when I create
them. What I'd really like is to have appointments that contain certain words
("School" or "Call") be saved as both a task and an appointment. I'm
constantly having to drag and drop right now, I'd really like to see if there
is a better way. Thank you.


You could use a wee macro to do this for you - the following macro will
turn the appointment you are on (saved) into a Task...

Sub CreateTaskFromAppointment()
Dim objCurrentItem As Outlook.AppointmentItem
Dim objNewTaskItem As Outlook.TaskItem

Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set objNewTaskItem = Outlook.CreateItem(olTaskItem)

objNewTaskItem.Subject = objCurrentItem.Subject
' set more properties...

objNewTaskItem.Save

Set objCurrentItem = Nothing
Set objNewTaskItem = Nothing

End Sub

--
Duncan


[one of his replies, and mine to that]...

Subject: Can I automatically make appointments into tasks also?
From: Duncan McC
Newsgroups: microsoft.public.outlook.calendaring
Date: Sat, 18 Mar 2006 13:25:58 +1300

In article ,
says...
Hey Duncan, before I start screwing stuff up trying to create the macro, I
had a few more questions. Is this going to be automatic (create the task when
I click "save and close" a new appointment), or will I need to go in to
macros and run it each time? My second one is a bit trickier, can I have new
tasks created from a new appointment ONLY if I have assigned it a specific
label (the color coding)? For example, create both the appointment and the
task when I select a red label, but just create the appointment when I select
a purple one. Thanks again


I think that can all be coded up - but I'm no expert.

Not sure on triggering off the Save button though (could surely make a
new button that does the same (Save, *and* put in Tasks IF color is set,
etc).

I would post to the vba NG - microsoft.public.outlook.program.vba - and
see if the experts can help you there.

--
Duncan

So yeah... can this be done? Is there an Event triggered on "Save"? If
not, best other options?

--
Duncan
Ads
  #2  
Old March 20th 06, 06:07 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Can I automatically make appointments into tasks also?

If you want to save an item you created using code you call the item's Save
method.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Duncan McC" wrote in message
...
A guy posted a Q in the .calendaring NG (see below) - and I'm wondering
now if it can indeed be done (fire off the Save Event - if such a thing
exists)...

Subject: Can I automatically make appointments into tasks also?
From: Duncan McC
Newsgroups: microsoft.public.outlook.calendaring
Date: Thu, 16 Mar 2006 21:32:49 +1300

In article ,
says...
I want to have my appointments automatically become a task when I create
them. What I'd really like is to have appointments that contain certain
words
("School" or "Call") be saved as both a task and an appointment. I'm
constantly having to drag and drop right now, I'd really like to see if
there
is a better way. Thank you.


You could use a wee macro to do this for you - the following macro will
turn the appointment you are on (saved) into a Task...

Sub CreateTaskFromAppointment()
Dim objCurrentItem As Outlook.AppointmentItem
Dim objNewTaskItem As Outlook.TaskItem

Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set objNewTaskItem = Outlook.CreateItem(olTaskItem)

objNewTaskItem.Subject = objCurrentItem.Subject
' set more properties...

objNewTaskItem.Save

Set objCurrentItem = Nothing
Set objNewTaskItem = Nothing

End Sub

--
Duncan


[one of his replies, and mine to that]...

Subject: Can I automatically make appointments into tasks also?
From: Duncan McC
Newsgroups: microsoft.public.outlook.calendaring
Date: Sat, 18 Mar 2006 13:25:58 +1300

In article ,
says...
Hey Duncan, before I start screwing stuff up trying to create the macro,
I
had a few more questions. Is this going to be automatic (create the task
when
I click "save and close" a new appointment), or will I need to go in to
macros and run it each time? My second one is a bit trickier, can I have
new
tasks created from a new appointment ONLY if I have assigned it a
specific
label (the color coding)? For example, create both the appointment and
the
task when I select a red label, but just create the appointment when I
select
a purple one. Thanks again


I think that can all be coded up - but I'm no expert.

Not sure on triggering off the Save button though (could surely make a
new button that does the same (Save, *and* put in Tasks IF color is set,
etc).

I would post to the vba NG - microsoft.public.outlook.program.vba - and
see if the experts can help you there.

--
Duncan

So yeah... can this be done? Is there an Event triggered on "Save"? If
not, best other options?

--
Duncan


  #3  
Old March 22nd 06, 12:11 AM posted to microsoft.public.outlook.program_vba
Duncan McC
external usenet poster
 
Posts: 56
Default Can I automatically make appointments into tasks also?

In article ,
says...
If you want to save an item you created using code you call the item's Save
method.


I would like to trigger the code, based on the Save action (keyboard or
mouse) - is this possible?

--
Duncan
  #4  
Old March 22nd 06, 04:16 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Can I automatically make appointments into tasks also?

Handle the Item.Save event then.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Duncan McC" wrote in message
...
In article ,
says...
If you want to save an item you created using code you call the item's
Save
method.


I would like to trigger the code, based on the Save action (keyboard or
mouse) - is this possible?

--
Duncan


  #5  
Old March 22nd 06, 04:18 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Can I automatically make appointments into tasks also?

My bad. Make that the Item.Write event.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Ken Slovak - [MVP - Outlook]" wrote in message
...
Handle the Item.Save event then.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


  #6  
Old March 23rd 06, 02:21 AM posted to microsoft.public.outlook.program_vba
Duncan McC
external usenet poster
 
Posts: 56
Default Can I automatically make appointments into tasks also?

In article ,
says...
My bad. Make that the Item.Write event.


Thanks Ken, looking into it.

--
Duncan
 




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 I automatically make appointments into tasks also? WildCide Outlook - Calandaring 9 March 18th 06 01:25 AM
I can no longer make appointments in Calender. GBMD Outlook - Calandaring 0 February 26th 06 09:51 PM
Tasks and Errors box won't hide automatically Mike W Outlook Express 8 February 10th 06 03:13 PM
Is it possible to make custom priorities for Outlook tasks? dim4x4 Outlook and VBA 3 February 10th 06 07:11 AM
How can I make Outlook automatically accept Mtg Requests? Eric Legault [MVP - Outlook] Outlook and VBA 0 January 9th 06 05:10 AM


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