setting 'AllDayEvent' causes an exception ?

M

Mark Beiley

I have an add-in that is modifying the properties of a calendar event. When
it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most events, but
on some events this will fail. Any ideas why this would fail? Is there
some other property I need to make sure to set first or something?

Thanks,
Mark
 
M

Mark Beiley

Hi Dmitry,

I don't see any error message... I have this in a try/catch block and
Outlook throws an exception when I try and set AllDayEvent. My code looks
like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some sort of
error message from Outlook? I really have no indication of 'why' it is
failing, I just know where it fails.


Thanks,
Mark
 
D

Dmitry Streblechenko

Do you log the exception details in your catch() block? Does the error get
raised immediately or only after you process a few items? Where does olAppt
come from? Are you sure it is an AppointmentItem object and not something
else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
M

Mark Beiley

Hi Dmitry,

I don't log any exception details in the catch block. Honestly, I'm not
sure how, but I can probably research it and figure out how. What sort of
details are available that would be helpful for logging in the catch block?
Do you know if there is some error message or code set somewhere when
Outlook throws an exception?

It gets raised immediately. I only have this one line of code in the try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully use it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com
 
M

Mark Beiley

Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give more
information on what the problem is. (I have to wait for my customer who is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

Thanks,
Mark
 
M

Mark J. McGinty

Mark Beiley said:
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give more
information on what the problem is. (I have to wait for my customer who
is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property assignment."

Assigning the AllDayEvent property will throw an error if a recurrence
pattern has been defined for the AppointmentItem, you can test the
IsRecurring property to check for this. (The same applies to the Start and
End properties, assignments to them are invalid if the item is recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items, the
duration is set for 24 hours, but the event starts (according to Outlook) at
midnight in the system-configured time zone, when recurrence is defined.
Example: while living on the east coast, you create a recurrent event for
your wife's birthday; you then move to the west coast, and change your
system's time zone accordingly; the event for your wife's birthday now
starts at 9:00 PM on the day prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is, and it
does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change for
recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the underlying
UTC value to adjust it to display as midnight in the new time zone, but if
it does, it does so without changing LastModificationTime. I'd have to go
underneath OOM, and read the value [before and after changing time zones]
using Redemption to know for sure... too lazy to do that at the moment.)
:)


-Mark
 
M

Mark Beiley

When trying to set the AllDayEvent to 0, Outlook throws this exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The error
always seems to happen on the same specific event. Any ideas?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Mark J. McGinty said:
Mark Beiley said:
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give more
information on what the problem is. (I have to wait for my customer who
is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property assignment."

Assigning the AllDayEvent property will throw an error if a recurrence
pattern has been defined for the AppointmentItem, you can test the
IsRecurring property to check for this. (The same applies to the Start
and End properties, assignments to them are invalid if the item is
recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items, the
duration is set for 24 hours, but the event starts (according to Outlook)
at midnight in the system-configured time zone, when recurrence is
defined. Example: while living on the east coast, you create a recurrent
event for your wife's birthday; you then move to the west coast, and
change your system's time zone accordingly; the event for your wife's
birthday now starts at 9:00 PM on the day prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is, and
it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change for
recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the underlying
UTC value to adjust it to display as midnight in the new time zone, but if
it does, it does so without changing LastModificationTime. I'd have to go
underneath OOM, and read the value [before and after changing time zones]
using Redemption to know for sure... too lazy to do that at the moment.)
:)


-Mark
 
D

Dmitry Streblechenko

Are you really trying to change AllDayEvent for an instance of a recurring
activity, not the master appointment??

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Mark Beiley said:
When trying to set the AllDayEvent to 0, Outlook throws this exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The
error always seems to happen on the same specific event. Any ideas?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Mark J. McGinty said:
Mark Beiley said:
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give more
information on what the problem is. (I have to wait for my customer who
is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a recurrence
pattern has been defined for the AppointmentItem, you can test the
IsRecurring property to check for this. (The same applies to the Start
and End properties, assignments to them are invalid if the item is
recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items, the
duration is set for 24 hours, but the event starts (according to Outlook)
at midnight in the system-configured time zone, when recurrence is
defined. Example: while living on the east coast, you create a recurrent
event for your wife's birthday; you then move to the west coast, and
change your system's time zone accordingly; the event for your wife's
birthday now starts at 9:00 PM on the day prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is, and
it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change for
recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new time
zone, but if it does, it does so without changing LastModificationTime.
I'd have to go underneath OOM, and read the value [before and after
changing time zones] using Redemption to know for sure... too lazy to do
that at the moment.) :)


-Mark


Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly, I'm
not
sure how, but I can probably research it and figure out how. What sort
of
details are available that would be helpful for logging in the catch
block? Do you know if there is some error message or code set somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in the
try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully use
it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the error
get raised immediately or only after you process a few items? Where
does
olAppt come from? Are you sure it is an AppointmentItem object and not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch block
and
Outlook throws an exception when I try and set AllDayEvent. My code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some sort
of
error message from Outlook? I really have no indication of 'why' it
is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 
M

Mark J. McGinty

Mark Beiley said:
When trying to set the AllDayEvent to 0, Outlook throws this exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The
error always seems to happen on the same specific event. Any ideas?

Did you test the IsRecurring property of the item in question? (Or ask the
user if it is recurring?)

-Mark

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Mark J. McGinty said:
Mark Beiley said:
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give more
information on what the problem is. (I have to wait for my customer who
is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a recurrence
pattern has been defined for the AppointmentItem, you can test the
IsRecurring property to check for this. (The same applies to the Start
and End properties, assignments to them are invalid if the item is
recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items, the
duration is set for 24 hours, but the event starts (according to Outlook)
at midnight in the system-configured time zone, when recurrence is
defined. Example: while living on the east coast, you create a recurrent
event for your wife's birthday; you then move to the west coast, and
change your system's time zone accordingly; the event for your wife's
birthday now starts at 9:00 PM on the day prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is, and
it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change for
recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new time
zone, but if it does, it does so without changing LastModificationTime.
I'd have to go underneath OOM, and read the value [before and after
changing time zones] using Redemption to know for sure... too lazy to do
that at the moment.) :)


-Mark


Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly, I'm
not
sure how, but I can probably research it and figure out how. What sort
of
details are available that would be helpful for logging in the catch
block? Do you know if there is some error message or code set somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in the
try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully use
it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the error
get raised immediately or only after you process a few items? Where
does
olAppt come from? Are you sure it is an AppointmentItem object and not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch block
and
Outlook throws an exception when I try and set AllDayEvent. My code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some sort
of
error message from Outlook? I really have no indication of 'why' it
is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 
M

Mark Beiley

Hi Dmitry,

This should be either a master or non-recurring appointment. I will add
some code in my catch block to query 'RecurrenceState' to make sure. I'll
post the results once I get them (I have to wait for my customer to
reproduce this for me...).

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Dmitry Streblechenko said:
Are you really trying to change AllDayEvent for an instance of a recurring
activity, not the master appointment??

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Mark Beiley said:
When trying to set the AllDayEvent to 0, Outlook throws this exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The
error always seems to happen on the same specific event. Any ideas?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Mark J. McGinty said:
"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give more
information on what the problem is. (I have to wait for my customer
who is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a recurrence
pattern has been defined for the AppointmentItem, you can test the
IsRecurring property to check for this. (The same applies to the Start
and End properties, assignments to them are invalid if the item is
recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items,
the duration is set for 24 hours, but the event starts (according to
Outlook) at midnight in the system-configured time zone, when recurrence
is defined. Example: while living on the east coast, you create a
recurrent event for your wife's birthday; you then move to the west
coast, and change your system's time zone accordingly; the event for
your wife's birthday now starts at 9:00 PM on the day prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is,
and it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change for
recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new time
zone, but if it does, it does so without changing LastModificationTime.
I'd have to go underneath OOM, and read the value [before and after
changing time zones] using Redemption to know for sure... too lazy to do
that at the moment.) :)


-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly, I'm
not
sure how, but I can probably research it and figure out how. What
sort of
details are available that would be helpful for logging in the catch
block? Do you know if there is some error message or code set
somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in the
try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully use
it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the
error
get raised immediately or only after you process a few items? Where
does
olAppt come from? Are you sure it is an AppointmentItem object and
not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch block
and
Outlook throws an exception when I try and set AllDayEvent. My code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some sort
of
error message from Outlook? I really have no indication of 'why' it
is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 
M

Mark Beiley

Hi Mark,

No, I haven't tested IsRecurring. Is there some required relationship
between this and AllDayEvent? I am under the impression that you can set
AllDayEvent on either a one time or a recurring master appointment...

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Mark J. McGinty said:
Mark Beiley said:
When trying to set the AllDayEvent to 0, Outlook throws this exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The
error always seems to happen on the same specific event. Any ideas?

Did you test the IsRecurring property of the item in question? (Or ask
the user if it is recurring?)

-Mark

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Mark J. McGinty said:
"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give more
information on what the problem is. (I have to wait for my customer
who is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a recurrence
pattern has been defined for the AppointmentItem, you can test the
IsRecurring property to check for this. (The same applies to the Start
and End properties, assignments to them are invalid if the item is
recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items,
the duration is set for 24 hours, but the event starts (according to
Outlook) at midnight in the system-configured time zone, when recurrence
is defined. Example: while living on the east coast, you create a
recurrent event for your wife's birthday; you then move to the west
coast, and change your system's time zone accordingly; the event for
your wife's birthday now starts at 9:00 PM on the day prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is,
and it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change for
recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new time
zone, but if it does, it does so without changing LastModificationTime.
I'd have to go underneath OOM, and read the value [before and after
changing time zones] using Redemption to know for sure... too lazy to do
that at the moment.) :)


-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly, I'm
not
sure how, but I can probably research it and figure out how. What
sort of
details are available that would be helpful for logging in the catch
block? Do you know if there is some error message or code set
somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in the
try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully use
it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the
error
get raised immediately or only after you process a few items? Where
does
olAppt come from? Are you sure it is an AppointmentItem object and
not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch block
and
Outlook throws an exception when I try and set AllDayEvent. My code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some sort
of
error message from Outlook? I really have no indication of 'why' it
is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 
D

Dmitry Streblechenko

Check the value of the RecurrenceState property, and if it is
olApptOccurrence or olApptException, use the master appointment instead
(will be returned by AppointmentItem.Parent)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Mark Beiley said:
Hi Dmitry,

This should be either a master or non-recurring appointment. I will add
some code in my catch block to query 'RecurrenceState' to make sure. I'll
post the results once I get them (I have to wait for my customer to
reproduce this for me...).

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Dmitry Streblechenko said:
Are you really trying to change AllDayEvent for an instance of a
recurring activity, not the master appointment??

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Mark Beiley said:
When trying to set the AllDayEvent to 0, Outlook throws this exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The
error always seems to happen on the same specific event. Any ideas?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com




"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give more
information on what the problem is. (I have to wait for my customer
who is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a recurrence
pattern has been defined for the AppointmentItem, you can test the
IsRecurring property to check for this. (The same applies to the Start
and End properties, assignments to them are invalid if the item is
recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items,
the duration is set for 24 hours, but the event starts (according to
Outlook) at midnight in the system-configured time zone, when
recurrence is defined. Example: while living on the east coast, you
create a recurrent event for your wife's birthday; you then move to the
west coast, and change your system's time zone accordingly; the event
for your wife's birthday now starts at 9:00 PM on the day prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is,
and it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change for
recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new
time zone, but if it does, it does so without changing
LastModificationTime. I'd have to go underneath OOM, and read the value
[before and after changing time zones] using Redemption to know for
sure... too lazy to do that at the moment.) :)


-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly, I'm
not
sure how, but I can probably research it and figure out how. What
sort of
details are available that would be helpful for logging in the catch
block? Do you know if there is some error message or code set
somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in the
try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully use
it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the
error
get raised immediately or only after you process a few items? Where
does
olAppt come from? Are you sure it is an AppointmentItem object and
not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch block
and
Outlook throws an exception when I try and set AllDayEvent. My
code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some
sort of
error message from Outlook? I really have no indication of 'why'
it is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 
M

Mark Beiley

Hi Dmitry,

The RecurrenceState property is: olApptMaster (1).

The other Mark gave me a good tip, in that I believe it has to do with being
a recurring appointment. It seems you cannot set AllDayEvent/Start/End on
an appointment that is recurring. Instead, you must set StartTime/EndTime
on the recurrence pattern of that appointment. This seems to have fixed my
problem. Does that seem right?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com


Dmitry Streblechenko said:
Check the value of the RecurrenceState property, and if it is
olApptOccurrence or olApptException, use the master appointment instead
(will be returned by AppointmentItem.Parent)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Mark Beiley said:
Hi Dmitry,

This should be either a master or non-recurring appointment. I will add
some code in my catch block to query 'RecurrenceState' to make sure.
I'll post the results once I get them (I have to wait for my customer to
reproduce this for me...).

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Dmitry Streblechenko said:
Are you really trying to change AllDayEvent for an instance of a
recurring activity, not the master appointment??

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
When trying to set the AllDayEvent to 0, Outlook throws this exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The
error always seems to happen on the same specific event. Any ideas?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com




"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give
more
information on what the problem is. (I have to wait for my customer
who is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a recurrence
pattern has been defined for the AppointmentItem, you can test the
IsRecurring property to check for this. (The same applies to the
Start and End properties, assignments to them are invalid if the item
is recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items,
the duration is set for 24 hours, but the event starts (according to
Outlook) at midnight in the system-configured time zone, when
recurrence is defined. Example: while living on the east coast, you
create a recurrent event for your wife's birthday; you then move to
the west coast, and change your system's time zone accordingly; the
event for your wife's birthday now starts at 9:00 PM on the day prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is,
and it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change for
recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new
time zone, but if it does, it does so without changing
LastModificationTime. I'd have to go underneath OOM, and read the
value [before and after changing time zones] using Redemption to know
for sure... too lazy to do that at the moment.) :)


-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly, I'm
not
sure how, but I can probably research it and figure out how. What
sort of
details are available that would be helpful for logging in the catch
block? Do you know if there is some error message or code set
somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in
the try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully
use it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the
error
get raised immediately or only after you process a few items? Where
does
olAppt come from? Are you sure it is an AppointmentItem object and
not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch block
and
Outlook throws an exception when I try and set AllDayEvent. My
code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some
sort of
error message from Outlook? I really have no indication of 'why'
it is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 
D

Dmitry Streblechenko

Ah! yes, it makes sense - I do see the same behavior for the master
recurring activities.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Mark Beiley said:
Hi Dmitry,

The RecurrenceState property is: olApptMaster (1).

The other Mark gave me a good tip, in that I believe it has to do with
being a recurring appointment. It seems you cannot set
AllDayEvent/Start/End on an appointment that is recurring. Instead, you
must set StartTime/EndTime on the recurrence pattern of that appointment.
This seems to have fixed my problem. Does that seem right?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com


Dmitry Streblechenko said:
Check the value of the RecurrenceState property, and if it is
olApptOccurrence or olApptException, use the master appointment instead
(will be returned by AppointmentItem.Parent)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Mark Beiley said:
Hi Dmitry,

This should be either a master or non-recurring appointment. I will add
some code in my catch block to query 'RecurrenceState' to make sure.
I'll post the results once I get them (I have to wait for my customer to
reproduce this for me...).

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Are you really trying to change AllDayEvent for an instance of a
recurring activity, not the master appointment??

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
When trying to set the AllDayEvent to 0, Outlook throws this
exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The
error always seems to happen on the same specific event. Any ideas?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com




"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give
more
information on what the problem is. (I have to wait for my customer
who is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a
recurrence pattern has been defined for the AppointmentItem, you can
test the IsRecurring property to check for this. (The same applies
to the Start and End properties, assignments to them are invalid if
the item is recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items,
the duration is set for 24 hours, but the event starts (according to
Outlook) at midnight in the system-configured time zone, when
recurrence is defined. Example: while living on the east coast, you
create a recurrent event for your wife's birthday; you then move to
the west coast, and change your system's time zone accordingly; the
event for your wife's birthday now starts at 9:00 PM on the day
prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is,
and it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change
for recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new
time zone, but if it does, it does so without changing
LastModificationTime. I'd have to go underneath OOM, and read the
value [before and after changing time zones] using Redemption to know
for sure... too lazy to do that at the moment.) :)


-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly,
I'm not
sure how, but I can probably research it and figure out how. What
sort of
details are available that would be helpful for logging in the
catch
block? Do you know if there is some error message or code set
somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in
the try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully
use it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the
error
get raised immediately or only after you process a few items?
Where does
olAppt come from? Are you sure it is an AppointmentItem object and
not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch
block and
Outlook throws an exception when I try and set AllDayEvent. My
code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some
sort of
error message from Outlook? I really have no indication of 'why'
it is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 
M

Mark J. McGinty

Mark Beiley said:
Hi Dmitry,

The RecurrenceState property is: olApptMaster (1).

The other Mark gave me a good tip, in that I believe it has to do with
being a recurring appointment. It seems you cannot set
AllDayEvent/Start/End on an appointment that is recurring. Instead, you
must set StartTime/EndTime on the recurrence pattern of that appointment.
This seems to have fixed my problem. Does that seem right?

Doesn't seem right to me at all, but that's the way Outlook is! :)

Actually, it's probably because changing AllDayEvent implicitly changes
Start and End, so if changing either of those becomes invalid, changing
AllDayEvent must likewise become invalid.

-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


Dmitry Streblechenko said:
Check the value of the RecurrenceState property, and if it is
olApptOccurrence or olApptException, use the master appointment instead
(will be returned by AppointmentItem.Parent)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Mark Beiley said:
Hi Dmitry,

This should be either a master or non-recurring appointment. I will add
some code in my catch block to query 'RecurrenceState' to make sure.
I'll post the results once I get them (I have to wait for my customer to
reproduce this for me...).

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Are you really trying to change AllDayEvent for an instance of a
recurring activity, not the master appointment??

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
When trying to set the AllDayEvent to 0, Outlook throws this
exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission. The
error always seems to happen on the same specific event. Any ideas?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com




"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give
more
information on what the problem is. (I have to wait for my customer
who is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a
recurrence pattern has been defined for the AppointmentItem, you can
test the IsRecurring property to check for this. (The same applies
to the Start and End properties, assignments to them are invalid if
the item is recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring items,
the duration is set for 24 hours, but the event starts (according to
Outlook) at midnight in the system-configured time zone, when
recurrence is defined. Example: while living on the east coast, you
create a recurrent event for your wife's birthday; you then move to
the west coast, and change your system's time zone accordingly; the
event for your wife's birthday now starts at 9:00 PM on the day
prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone is,
and it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change
for recurrent items, it's just the displayed value that adjusts. For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new
time zone, but if it does, it does so without changing
LastModificationTime. I'd have to go underneath OOM, and read the
value [before and after changing time zones] using Redemption to know
for sure... too lazy to do that at the moment.) :)


-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly,
I'm not
sure how, but I can probably research it and figure out how. What
sort of
details are available that would be helpful for logging in the
catch
block? Do you know if there is some error message or code set
somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in
the try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully
use it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the
error
get raised immediately or only after you process a few items?
Where does
olAppt come from? Are you sure it is an AppointmentItem object and
not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch
block and
Outlook throws an exception when I try and set AllDayEvent. My
code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some
sort of
error message from Outlook? I really have no indication of 'why'
it is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 
M

Mark Beiley

Thanks to both of you for all your help!

Thanks,
Mark
--
Beiley Software
http://www.beiley.com


Mark J. McGinty said:
Mark Beiley said:
Hi Dmitry,

The RecurrenceState property is: olApptMaster (1).

The other Mark gave me a good tip, in that I believe it has to do with
being a recurring appointment. It seems you cannot set
AllDayEvent/Start/End on an appointment that is recurring. Instead, you
must set StartTime/EndTime on the recurrence pattern of that appointment.
This seems to have fixed my problem. Does that seem right?

Doesn't seem right to me at all, but that's the way Outlook is! :)

Actually, it's probably because changing AllDayEvent implicitly changes
Start and End, so if changing either of those becomes invalid, changing
AllDayEvent must likewise become invalid.

-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


Dmitry Streblechenko said:
Check the value of the RecurrenceState property, and if it is
olApptOccurrence or olApptException, use the master appointment instead
(will be returned by AppointmentItem.Parent)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

This should be either a master or non-recurring appointment. I will
add
some code in my catch block to query 'RecurrenceState' to make sure.
I'll post the results once I get them (I have to wait for my customer
to
reproduce this for me...).

Thanks,
Mark
--
Beiley Software
http://www.beiley.com



Are you really trying to change AllDayEvent for an instance of a
recurring activity, not the master appointment??

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
When trying to set the AllDayEvent to 0, Outlook throws this
exception:

Exception 0xc6204005 from Microsoft Office Outlook
Error Desc: You don't have the permission to move this item.

They are using a local .pst file, so they should have permission.
The
error always seems to happen on the same specific event. Any ideas?

Thanks,
Mark
--
Beiley Software
http://www.beiley.com




"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I found a class '_com_error', which will capture information thrown
by Outlook. It has both an error number and a description.

I've added this into my catch block, and hopefully this will give
more
information on what the problem is. (I have to wait for my
customer
who is
experiencing this problem, I can't reproduce it here...)
I'll post the results once I get them.

That error message will include the phrase, "invalid property
assignment."

Assigning the AllDayEvent property will throw an error if a
recurrence pattern has been defined for the AppointmentItem, you can
test the IsRecurring property to check for this. (The same applies
to the Start and End properties, assignments to them are invalid if
the item is recurring.)

Correspondingly, the AllDayEvent flag is ignored for recurring
items,
the duration is set for 24 hours, but the event starts (according to
Outlook) at midnight in the system-configured time zone, when
recurrence is defined. Example: while living on the east coast, you
create a recurrent event for your wife's birthday; you then move to
the west coast, and change your system's time zone accordingly; the
event for your wife's birthday now starts at 9:00 PM on the day
prior.

Conversely, a non-recurring item flagged as as AllDayEvent starts at
midnight in the system's time zone, no matter what that time zone
is,
and it does not change if the timezone changes.

(Technically, the underlying value [stored as UTC] does not change
for recurrent items, it's just the displayed value that adjusts.
For
non-recurring AllDayEvents, Outlook *might* actually change the
underlying UTC value to adjust it to display as midnight in the new
time zone, but if it does, it does so without changing
LastModificationTime. I'd have to go underneath OOM, and read the
value [before and after changing time zones] using Redemption to
know
for sure... too lazy to do that at the moment.) :)


-Mark



Thanks,
Mark
--
Beiley Software
http://www.beiley.com


"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't log any exception details in the catch block. Honestly,
I'm not
sure how, but I can probably research it and figure out how. What
sort of
details are available that would be helpful for logging in the
catch
block? Do you know if there is some error message or code set
somewhere
when Outlook throws an exception?

It gets raised immediately. I only have this one line of code in
the try
block.

I'm pretty sure the olAppt is valid and an appointment item. I'm
enumerating through items in the calendar folder. I successfully
use it
right before this to set other properties like Body and Location.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com





Do you log the exception details in your catch() block? Does the
error
get raised immediately or only after you process a few items?
Where does
olAppt come from? Are you sure it is an AppointmentItem object
and
not
something else?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
Hi Dmitry,

I don't see any error message... I have this in a try/catch
block and
Outlook throws an exception when I try and set AllDayEvent. My
code
looks like this:

try
{
olAppt->AllDayEvent = 0;
}
catch(...)
{
// do some error logging...
}

I'm writing my add-in in C++. Is there some way I can get some
sort of
error message from Outlook? I really have no indication of
'why'
it is
failing, I just know where it fails.


Thanks,
Mark
--
Beiley Software
http://www.beiley.com



And what is the exact error message?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Mark Beiley" <nowhere AT donotuse.com> wrote in message
I have an add-in that is modifying the properties of a calendar
event.
When it gets here:

olAppt->AllDayEvent = 0;

Outlook is throwing an exception. This code works fine on
most
events, but on some events this will fail. Any ideas why this
would
fail? Is there some other property I need to make sure to set
first
or something?

Thanks,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top