Ken - Need immediate help.. 
Author Message
 Ken - Need immediate help..

    I am using the below code to modify the start time of
an appointment. It wrks fine with non-recurrence items but
gives me an error when I execute the same code for appnts
with recurrence. This is what I get as error

"This is a recurring item. To change this time, in the
open item, click the Actions menu, and then click
Recurrence."

I get an error when setting a value to the start property.
Why?? Any suggestions??

Set objAppItem = gobjOlNameSpace.GetItemFromID(sUID)
objAppItem.Start = Format(sStartTime, "mm/dd/yyyy
hh:mm:ss")

objAppItem.Save
objAppItem.Close olSave



Sun, 24 Apr 2005 13:00:50 GMT  
 Ken - Need immediate help..
You have to check if the item is a recurring item and if so you have
to use the GetRecurrencePattern method to get the RecurrencePattern.
Then you would use the GetOccurrence method of the RecurrencePattern
object to get the next occurrence as an AppointmentItem and make your
change in that item.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Quote:

>     I am using the below code to modify the start time of
> an appointment. It wrks fine with non-recurrence items but
> gives me an error when I execute the same code for appnts
> with recurrence. This is what I get as error

> "This is a recurring item. To change this time, in the
> open item, click the Actions menu, and then click
> Recurrence."

> I get an error when setting a value to the start property.
> Why?? Any suggestions??

> Set objAppItem = gobjOlNameSpace.GetItemFromID(sUID)
> objAppItem.Start = Format(sStartTime, "mm/dd/yyyy
> hh:mm:ss")

> objAppItem.Save
> objAppItem.Close olSave



Sun, 24 Apr 2005 23:59:21 GMT  
 Ken - Need immediate help..

Thank you very much ken. got it!!

Quote:
>-----Original Message-----
>You have to check if the item is a recurring item and if
so you have
>to use the GetRecurrencePattern method to get the
RecurrencePattern.
>Then you would use the GetOccurrence method of the
RecurrencePattern
>object to get the next occurrence as an AppointmentItem
and make your
>change in that item.

>--
>Ken Slovak
>[MVP - Outlook]
>http://www.slovaktech.com
>Lead Author, Professional Outlook 2000 Programming, Wrox
Press
>Lead Author, Beginning VB 6 Application Development, Wrox
Press
>Attachment Options
>http://www.slovaktech.com/attachmentoptions.htm
>Extended Reminders
>http://www.slovaktech.com/extendedreminders.htm


message

>>     I am using the below code to modify the start time
of
>> an appointment. It wrks fine with non-recurrence items
but
>> gives me an error when I execute the same code for
appnts
>> with recurrence. This is what I get as error

>> "This is a recurring item. To change this time, in the
>> open item, click the Actions menu, and then click
>> Recurrence."

>> I get an error when setting a value to the start
property.
>> Why?? Any suggestions??

>> Set objAppItem = gobjOlNameSpace.GetItemFromID(sUID)
>> objAppItem.Start = Format(sStartTime, "mm/dd/yyyy
>> hh:mm:ss")

>> objAppItem.Save
>> objAppItem.Close olSave

>.



Mon, 25 Apr 2005 17:24:59 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. NEED HELP DISABLING QB COMMANDS:IMMEDIATE REP. NEEDED

2. NEED HELP DISABLING QB COMMANDS:IMMEDIATE REP. NEE

3. Immediate help needed if possible

4. Ken Getz, Info Needed

5. US-MO-VISUAL BASIC/ACCESS PROGRAMMER NEEDED/CONRACT/IMMEDIATE

6. Immediate Need: Lead VB developer

7. Need Immediate Advice

8. (Q)File Save As Common Dialog *continued* (Ken-Help)

9. Help Please, Ken Getz!!

10. Ken Getz or Dev Aishis PLEASE HELP

11. Help Please, Ken Getz!!

12. Ken Getz's basLinkedTables help

 

 
Powered by phpBB® Forum Software