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

Tags: , ,

Outlook Appointment lable





 
 
Thread Tools Display Modes
  #1  
Old December 29th 07, 05:29 AM posted to microsoft.public.outlook.program_vba
Bill Dilworth
external usenet poster
 
Posts: 2
Default Outlook Appointment lable

I am trying to somewhat standardize the way my flights hotels and rental
cars appear in my outlook schedule. I will create a simple VBA form and
enter the known info and the code will enter the standardized info into the
calendar. Sounds simple enough.

I am not new to VBA, but have never applied it to Outlook before.

I am running Outlook 2003 with SP 3 on an XP box.

So far I am good with most of it, however, I can not figure out how to
adjust the "label" item (color-coded Travel Required" etc.) value.

Here is the code I kinda hacked out. Your expert advice or pointers to
locations to learn about these functions will be greatly appreciated.



Bill D.

-----------------------------------------

Private Sub AppointThis()

Dim myOlApp As Application
Dim myItem As Outlook.AppointmentItem

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olAppointmentItem)

With myItem
.Subject = "Flight"
.Location = "Pittsburgh"
.AllDayEvent = False
.Start = #1/3/2008 13:30# ' Date / Time
.Duration = "600" ' in minutes
.ReminderSet = False
.BusyStatus = olFree
.Body = "This is a sample text"

'This is the stuff I am not sure about
.IsOnlineMeeting = False
.MeetingStatus = olNonMeeting
.ConferenceServerAllowExternal = False
.ResponseRequested = False

'Save and end the insertion
.Save

End With

Set myItem = Nothing
Set myOlApp = Nothing

End Sub


Ads
  #2  
Old December 29th 07, 06:46 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,267
Default Outlook Appointment lable


You can't access the property with the Outlook object model. Here's a sample
for how to do that with the Redemption:
http://www.vboffice.net/sample.html?...item&lang=e n

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Outlook Categories:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Fri, 28 Dec 2007 23:29:16 -0500 schrieb Bill Dilworth:

I am trying to somewhat standardize the way my flights hotels and rental
cars appear in my outlook schedule. I will create a simple VBA form and
enter the known info and the code will enter the standardized info into

the
calendar. Sounds simple enough.

I am not new to VBA, but have never applied it to Outlook before.

I am running Outlook 2003 with SP 3 on an XP box.

So far I am good with most of it, however, I can not figure out how to
adjust the "label" item (color-coded Travel Required" etc.) value.

Here is the code I kinda hacked out. Your expert advice or pointers to
locations to learn about these functions will be greatly appreciated.



Bill D.

-----------------------------------------

Private Sub AppointThis()

Dim myOlApp As Application
Dim myItem As Outlook.AppointmentItem

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olAppointmentItem)

With myItem
.Subject = "Flight"
.Location = "Pittsburgh"
.AllDayEvent = False
.Start = #1/3/2008 13:30# ' Date / Time
.Duration = "600" ' in minutes
.ReminderSet = False
.BusyStatus = olFree
.Body = "This is a sample text"

'This is the stuff I am not sure about
.IsOnlineMeeting = False
.MeetingStatus = olNonMeeting
.ConferenceServerAllowExternal = False
.ResponseRequested = False

'Save and end the insertion
.Save

End With

Set myItem = Nothing
Set myOlApp = Nothing

End Sub

  #3  
Old December 29th 07, 07:04 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,793
Default Outlook Appointment lable

tem.Label isn't exposed in the Outlook 2003 object model. To access it you
would need to use CDO 1.21 or the 3rd party Redemption library
(www.dimastr.com/redemption) or other Extended MAPI COM wrapper.

The MAPI property tag for Label would be
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/82140003"
as a DASL property tag and if using GetIDsFromNames would be:
GetIDsFromNames("{00062002-0000-0000-C000-000000000046}", &H8214) OR
&H3.

The labels are set as 32-bit Longs, the "Travel Required" label would have a
value of 6.

With Outlook VBA never use CreateObject() to get an Application object. It
wouldn't be trusted. Use the intrinsic Application object instead.

Don't bother with .IsOnlineMeeting, .MeetingStatus,
..ConferenceServerAllowExternal or .ResponseRequested unless you actually
need to use those properties.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Bill Dilworth" wrote in message
...
I am trying to somewhat standardize the way my flights hotels and rental
cars appear in my outlook schedule. I will create a simple VBA form and
enter the known info and the code will enter the standardized info into the
calendar. Sounds simple enough.

I am not new to VBA, but have never applied it to Outlook before.

I am running Outlook 2003 with SP 3 on an XP box.

So far I am good with most of it, however, I can not figure out how to
adjust the "label" item (color-coded Travel Required" etc.) value.

Here is the code I kinda hacked out. Your expert advice or pointers to
locations to learn about these functions will be greatly appreciated.



Bill D.

-----------------------------------------

Private Sub AppointThis()

Dim myOlApp As Application
Dim myItem As Outlook.AppointmentItem

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olAppointmentItem)

With myItem
.Subject = "Flight"
.Location = "Pittsburgh"
.AllDayEvent = False
.Start = #1/3/2008 13:30# ' Date / Time
.Duration = "600" ' in minutes
.ReminderSet = False
.BusyStatus = olFree
.Body = "This is a sample text"

'This is the stuff I am not sure about
.IsOnlineMeeting = False
.MeetingStatus = olNonMeeting
.ConferenceServerAllowExternal = False
.ResponseRequested = False

'Save and end the insertion
.Save

End With

Set myItem = Nothing
Set myOlApp = Nothing

End Sub


  #4  
Old December 30th 07, 10:19 AM posted to microsoft.public.outlook.program_vba
Bill Dilworth
external usenet poster
 
Posts: 2
Default Outlook Appointment lable

Thank you folks.

Bill D.



"Ken Slovak - [MVP - Outlook]" wrote in message
...
tem.Label isn't exposed in the Outlook 2003 object model. To access it you
would need to use CDO 1.21 or the 3rd party Redemption library
(www.dimastr.com/redemption) or other Extended MAPI COM wrapper.

The MAPI property tag for Label would be
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/82140003"
as a DASL property tag and if using GetIDsFromNames would be:
GetIDsFromNames("{00062002-0000-0000-C000-000000000046}", &H8214) OR
&H3.

The labels are set as 32-bit Longs, the "Travel Required" label would have
a
value of 6.

With Outlook VBA never use CreateObject() to get an Application object. It
wouldn't be trusted. Use the intrinsic Application object instead.

Don't bother with .IsOnlineMeeting, .MeetingStatus,
.ConferenceServerAllowExternal or .ResponseRequested unless you actually
need to use those properties.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Bill Dilworth" wrote in message
...
I am trying to somewhat standardize the way my flights hotels and rental
cars appear in my outlook schedule. I will create a simple VBA form and
enter the known info and the code will enter the standardized info into
the
calendar. Sounds simple enough.

I am not new to VBA, but have never applied it to Outlook before.

I am running Outlook 2003 with SP 3 on an XP box.

So far I am good with most of it, however, I can not figure out how to
adjust the "label" item (color-coded Travel Required" etc.) value.

Here is the code I kinda hacked out. Your expert advice or pointers to
locations to learn about these functions will be greatly appreciated.



Bill D.

-----------------------------------------

Private Sub AppointThis()

Dim myOlApp As Application
Dim myItem As Outlook.AppointmentItem

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olAppointmentItem)

With myItem
.Subject = "Flight"
.Location = "Pittsburgh"
.AllDayEvent = False
.Start = #1/3/2008 13:30# ' Date / Time
.Duration = "600" ' in minutes
.ReminderSet = False
.BusyStatus = olFree
.Body = "This is a sample text"

'This is the stuff I am not sure about
.IsOnlineMeeting = False
.MeetingStatus = olNonMeeting
.ConferenceServerAllowExternal = False
.ResponseRequested = False

'Save and end the insertion
.Save

End With

Set myItem = Nothing
Set myOlApp = Nothing

End Sub




 




Thread Tools
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
When i open an existing appointment in Outlook Calendar, then close, it automatically creates an unwanted recurring appointment. David H Outlook - Calandaring 1 June 28th 07 11:32 AM
Appointment page does not come up when I click on New Appointment Ralin Outlook - Calandaring 0 January 26th 07 05:21 PM
Single appointment becomes a multiple appointment peter.cornfield@gmail.com Outlook - Calandaring 1 January 5th 07 03:06 PM
In Outlook 03,I can not print spouse's name on the Lable Chandru Outlook - Using Contacts 1 April 13th 06 11:06 AM
Recurring appointment/events linked to other recurring appointment uaewhitey Outlook - Calandaring 0 February 2nd 06 08:55 PM


All times are GMT +1. The time now is 12:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Current Accounts - Web Advertising - Ringtones - Mortgages - Current Accounts