CDO Problem within Outlook 
Author Message
 CDO Problem within Outlook

Need some CDO guru advice...

I'm using a O2k form published to a public folder on Exchange 5.5.  We use
the table views to enter data on a Contact folder.
Our problem stems from having multiple users viewing/entering data on the
contact folder. You don't know who has the contact
item open, hence conflict messages. We thought that by having the Contact
Status Flag updated when someone access the item
will make it easier for others viewing items in a table view to know that
item was being used.  We use CDO to update the status flag
but get the following error message.

The item could not be saved because it has been changed by another user or
in another window.
Do you want to make a copy in the default folder for the item?

It will not allow us to save the record....

Please review the below code and make suggestions to fix or validate the
concept as "not going to work"?

We access the item_read function we call the following procedure.

FlagStatus(Add)

sub FlagStatus(txtStatus)

'Outlook property set ID
'const CdoPropSetID4 = "0820060000000000C000000000000046"

'Mapi property tag used
Const CdoPR_FLAG_STATUS = &H10900003

' Flag status
Const FLAG_NONE = 0
Const FLAG_WHITE = 1
Const FLAG_RED = 2

'Change status field
flag********************************************************
Set objSession = CreateObject("MAPI.Session")
objSession.Logon , , False, False, -1, True
Set objMessage = objSession.GetMessage(Item.EntryID, Item.Parent.StoreID)

' Get message fields
Set objFields = objMessage.Fields
If txtStatus = "Add" Then
' Set red flag
 objFields.Add CdoPR_FLAG_STATUS, FLAG_RED
ElseIf txtStatus = "Delete" Then
 objFields.Add CdoPR_FLAG_STATUS, FLAG_NONE
End If
objMessage.Update
Set objSession = Nothing
end sub



Mon, 15 Mar 2004 03:47:46 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Help with CDO/Outlook mapi problem

2. problem using CDO and Outlook Xp

3. Problem setting Outlook PR_OFFLINE_FLAGS CDO value

4. CDO vs Outlook 2000 Object Library?? (Outlook Newbie)

5. Print out MS Outlook calendars via VBA WITHIN MS Outlook

6. Referencing the Outlook Application from a Web Page running within Outlook

7. CDO within a service

8. Mail with cdo, cdonts, or from within office app

9. CDO vs Outlook libraries

10. CDO & Outlook-Out of memory, messages collection

11. Outlook Automation and CDO

12. Outlook Object Model and CDO

 

 
Powered by phpBB® Forum Software