Hello again,
here I have a similar example with the same problem:
Public Sub Test()
Dim objNameSpace As Object
Dim objRDOSession As Object
Dim objRDOItem As Object
Dim strEntryID As String
Dim strStoreID As String
Set objRDOSession = CreateObject("Redemption.RDOSession")
Set objNameSpace = Nothing
Set objNameSpace = Outlook.GetNamespace("MAPI")
objNameSpace.Logon
objRDOSession.MAPIOBJECT = objNameSpace.MAPIOBJECT
With Outlook.ActiveExplorer.Selection(1)
strEntryID = .EntryID
strStoreID = .Parent.StoreID
End With
Set objRDOItem = objRDOSession.GetMessageFromID(strEntryID,
strStoreID)
objRDOItem.Subject = "Test"
objRDOItem.Save
End Sub
If I want to change the subject (or something else) after the code
made changes to the item, the following message appears: "The item
could not be saved because it has been changed by another user or in
another window"
I think this have to do with the RDO-Session and tried also
"objRDOSession.Logon "", "", False, False, 0" instead of
"objRDOSession.MAPIOBJECT = objNameSpace.MAPIOBJECT" but there is no
different. I´m using version 4.3.0.585.
Any suggestions are welcome!
Peter
> Thanks Dmitry for your answer,
>
[quoted text clipped - 63 lines]
>
> - Zitierten Text anzeigen -
Dmitry Streblechenko - 30 Mar 2007 18:30 GMT
This is an expected error - the message is opened by Outlook, then you
reopen it from Redemption and save it. When Outlook tries to save it, the
store reports that there was a conflict.
Why can't you use OOM to set the subject? Subject property does not cause
security prompts.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
Hello again,
here I have a similar example with the same problem:
Public Sub Test()
Dim objNameSpace As Object
Dim objRDOSession As Object
Dim objRDOItem As Object
Dim strEntryID As String
Dim strStoreID As String
Set objRDOSession = CreateObject("Redemption.RDOSession")
Set objNameSpace = Nothing
Set objNameSpace = Outlook.GetNamespace("MAPI")
objNameSpace.Logon
objRDOSession.MAPIOBJECT = objNameSpace.MAPIOBJECT
With Outlook.ActiveExplorer.Selection(1)
strEntryID = .EntryID
strStoreID = .Parent.StoreID
End With
Set objRDOItem = objRDOSession.GetMessageFromID(strEntryID,
strStoreID)
objRDOItem.Subject = "Test"
objRDOItem.Save
End Sub
If I want to change the subject (or something else) after the code
made changes to the item, the following message appears: "The item
could not be saved because it has been changed by another user or in
another window"
I think this have to do with the RDO-Session and tried also
"objRDOSession.Logon "", "", False, False, 0" instead of
"objRDOSession.MAPIOBJECT = objNameSpace.MAPIOBJECT" but there is no
different. I´m using version 4.3.0.585.
Any suggestions are welcome!
Peter
> Thanks Dmitry for your answer,
>
[quoted text clipped - 67 lines]
>
> - Zitierten Text anzeigen -
Peter Marchert - 30 Mar 2007 18:34 GMT
Thanks for your answer, Dmitry.
The change of the subject was only a example. I posted a simple code
example to be sure that this behaivour is normal and have nothing to
do with the code.
I need the redemption to set the filename of the attachment of a
message (and/or documentitem, not a file :-)).
Peter
> This is an expected error - the message is opened by Outlook, then you
> reopen it from Redemption and save it. When Outlook tries to save it, the
[quoted text clipped - 123 lines]
>
> - Zitierten Text anzeigen -
Dmitry Streblechenko - 30 Mar 2007 21:34 GMT
Yes, if the message is also open in Outlook and modified, you will get a
conflict error.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
Thanks for your answer, Dmitry.
The change of the subject was only a example. I posted a simple code
example to be sure that this behaivour is normal and have nothing to
do with the code.
I need the redemption to set the filename of the attachment of a
message (and/or documentitem, not a file :-)).
Peter
On 30 Mrz., 19:30, "Dmitry Streblechenko" <dmi...@dimastr.com> wrote:
> This is an expected error - the message is opened by Outlook, then you
> reopen it from Redemption and save it. When Outlook tries to save it, the
[quoted text clipped - 129 lines]
>
> - Zitierten Text anzeigen -