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

Redemption MessageItem SaveAs problem



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 27th 09, 04:14 PM posted to microsoft.public.outlook.program_vba
Yevgen
external usenet poster
 
Posts: 4
Default Redemption MessageItem SaveAs problem

Hello,

I have problem with Redemption SaveAs method for MessageItem object.

I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To" property
is set correctly.

Please consult me with TNEF, also maybe it's a bug of SaveAs method in
Redemption library.

Thank you very much!
Ads
  #2  
Old May 28th 09, 10:18 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Redemption MessageItem SaveAs problem

Are you using the MAPIUtils object (which is deprecated)?
Use RDOSession object instead: sets its MAPIOBJECT property to
Application.Session.MAPIOBJECT proeprty from OOM (if you work with it) or
call Logon.
You can then reopen the message using RDOSession.GetMessageFromId, then save
the rerurned message (RDOMail.Save).

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Yevgen" wrote in message
...
Hello,

I have problem with Redemption SaveAs method for MessageItem object.

I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To" property
is set correctly.

Please consult me with TNEF, also maybe it's a bug of SaveAs method in
Redemption library.

Thank you very much!



  #3  
Old May 29th 09, 10:55 AM posted to microsoft.public.outlook.program_vba
Yevgen
external usenet poster
 
Posts: 4
Default Redemption MessageItem SaveAs problem

On May 29, 12:18*am, "Dmitry Streblechenko"
wrote:
Are you using the MAPIUtils object (which is deprecated)?
Use RDOSession object instead: sets its MAPIOBJECT property to
Application.Session.MAPIOBJECT proeprty from OOM (if you work with it) or
call Logon.
You can then reopen the message using RDOSession.GetMessageFromId, then save
the rerurned message (RDOMail.Save).

--
Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy *- Outlook, CDO
and MAPI Developer Tool
-"Yevgen" wrote in message

...

Hello,


I have problem with Redemption SaveAs method for MessageItem object.


I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To" property
is set correctly.


Please consult me with TNEF, also maybe it's a bug of SaveAs method in
Redemption library.


Thank you very much!


I have changed my code. So now I'm using RDOSession object instead of
MapiUtils.
Here is my code:

Dim oMsgItem As Redemption.RDOMail

Set oMsgItem = oRDOSession.GetMessageFromID(sItemEntryID)

oMsgItem .SaveAs sSaveAs, lType


Where lType = 1025 (TNEF)

But still I received the same problem. Items from Logged in user
mailbox has "To" field data and items from additional Exchange
mailboxes don't.

What the problem is? How can I fix it?

Thanks!
  #4  
Old June 1st 09, 08:42 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Redemption MessageItem SaveAs problem

Hmmm... Redemption does not create the TNEF attachment itself, it rather
asks MAPI to do that.
How do you open and check the resulting TNEF files?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Yevgen" wrote in message
...
On May 29, 12:18 am, "Dmitry Streblechenko"
wrote:
Are you using the MAPIUtils object (which is deprecated)?
Use RDOSession object instead: sets its MAPIOBJECT property to
Application.Session.MAPIOBJECT proeprty from OOM (if you work with it) or
call Logon.
You can then reopen the message using RDOSession.GetMessageFromId, then
save
the rerurned message (RDOMail.Save).

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

...

Hello,


I have problem with Redemption SaveAs method for MessageItem object.


I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To" property
is set correctly.


Please consult me with TNEF, also maybe it's a bug of SaveAs method in
Redemption library.


Thank you very much!


I have changed my code. So now I'm using RDOSession object instead of
MapiUtils.
Here is my code:

Dim oMsgItem As Redemption.RDOMail

Set oMsgItem = oRDOSession.GetMessageFromID(sItemEntryID)

oMsgItem .SaveAs sSaveAs, lType


Where lType = 1025 (TNEF)

But still I received the same problem. Items from Logged in user
mailbox has "To" field data and items from additional Exchange
mailboxes don't.

What the problem is? How can I fix it?

Thanks!


  #5  
Old June 4th 09, 11:59 AM posted to microsoft.public.outlook.program_vba
Yevgen
external usenet poster
 
Posts: 4
Default Redemption MessageItem SaveAs problem

On Jun 1, 10:42*pm, "Dmitry Streblechenko" wrote:
Hmmm... Redemption does not create the TNEF attachment itself, it rather
asks MAPI to do that.
How do you open and check the resulting TNEF files?

--
Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy *- Outlook, CDO
and MAPI Developer Tool
-"Yevgen" wrote in message

...
On May 29, 12:18 am, "Dmitry Streblechenko"
wrote:



Are you using the MAPIUtils object (which is deprecated)?
Use RDOSession object instead: sets its MAPIOBJECT property to
Application.Session.MAPIOBJECT proeprty from OOM (if you work with it) or
call Logon.
You can then reopen the message using RDOSession.GetMessageFromId, then
save
the rerurned message (RDOMail.Save).


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


....


Hello,


I have problem with Redemption SaveAs method for MessageItem object.


I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To" property
is set correctly.


Please consult me with TNEF, also maybe it's a bug of SaveAs method in
Redemption library.


Thank you very much!


I have changed my code. So now I'm using RDOSession object instead of
MapiUtils.
Here is my code:

Dim oMsgItem As Redemption.RDOMail

Set oMsgItem = oRDOSession.GetMessageFromID(sItemEntryID)

oMsgItem .SaveAs sSaveAs, lType

Where lType = 1025 (TNEF)

But still I received the same problem. Items from Logged in user
mailbox has "To" field data and items from additional Exchange
mailboxes don't.

What the problem is? How can I fix it?

Thanks!


Hello Dmitry,

There is 2 variants how I'm opening these files.

1. Simple through text editor. and when you will compare 2 files you
will see that one of them contains "To:" information, another one not.
2. I have special application which open this files through Outlook.
Here is sample code:

Set oOlItem = oFolder.Items.Add(olPostItem)

Set oSafeItem = CreateObject("Redemption.SafeMailItem")

Set oOlItem = oOutlook.CreateItemFromTemplate(sSaveDir &
MESSAGE_TEMP_FILE, oFolder)

oOlItem.Save

Set oSafeItem.Item = oOlItem

oSafeItem.Import sSaveDir & MESSAGE_TEMP_FILE, iType

oSafeItem.Save

StrEntryID = oSafeItem.EntryID

Set oOlItem = Nothing
Set oSafeItem = Nothing

Set oSafeItem = oNamespace.Session.GetItemFromID(StrEntryID,
oFolder.StoreID)

oSafeItem.Display

So with both variants I have the same result. I think the easiest way
to check if the "TO:" information is saved is to compare 2 files with
any compare utility.

Thank you for helping.
  #6  
Old June 11th 09, 09:48 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Redemption MessageItem SaveAs problem

Hmmm... Normally, the PR_DISPLAY_TO property is not saved at all since it is
computed from the contents of the recipeints table.
Does it work if you import teh TENF file using RDOMail rather than
MailItem/SafeMailItem, which may overwrite the imported recipients.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Yevgen" wrote in message
...
On Jun 1, 10:42 pm, "Dmitry Streblechenko" wrote:
Hmmm... Redemption does not create the TNEF attachment itself, it rather
asks MAPI to do that.
How do you open and check the resulting TNEF files?

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

...
On May 29, 12:18 am, "Dmitry Streblechenko"
wrote:



Are you using the MAPIUtils object (which is deprecated)?
Use RDOSession object instead: sets its MAPIOBJECT property to
Application.Session.MAPIOBJECT proeprty from OOM (if you work with it)
or
call Logon.
You can then reopen the message using RDOSession.GetMessageFromId, then
save
the rerurned message (RDOMail.Save).


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


...


Hello,


I have problem with Redemption SaveAs method for MessageItem object.


I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To" property
is set correctly.


Please consult me with TNEF, also maybe it's a bug of SaveAs method in
Redemption library.


Thank you very much!


I have changed my code. So now I'm using RDOSession object instead of
MapiUtils.
Here is my code:

Dim oMsgItem As Redemption.RDOMail

Set oMsgItem = oRDOSession.GetMessageFromID(sItemEntryID)

oMsgItem .SaveAs sSaveAs, lType

Where lType = 1025 (TNEF)

But still I received the same problem. Items from Logged in user
mailbox has "To" field data and items from additional Exchange
mailboxes don't.

What the problem is? How can I fix it?

Thanks!


Hello Dmitry,

There is 2 variants how I'm opening these files.

1. Simple through text editor. and when you will compare 2 files you
will see that one of them contains "To:" information, another one not.
2. I have special application which open this files through Outlook.
Here is sample code:

Set oOlItem = oFolder.Items.Add(olPostItem)

Set oSafeItem = CreateObject("Redemption.SafeMailItem")

Set oOlItem = oOutlook.CreateItemFromTemplate(sSaveDir &
MESSAGE_TEMP_FILE, oFolder)

oOlItem.Save

Set oSafeItem.Item = oOlItem

oSafeItem.Import sSaveDir & MESSAGE_TEMP_FILE, iType

oSafeItem.Save

StrEntryID = oSafeItem.EntryID

Set oOlItem = Nothing
Set oSafeItem = Nothing

Set oSafeItem = oNamespace.Session.GetItemFromID(StrEntryID,
oFolder.StoreID)

oSafeItem.Display

So with both variants I have the same result. I think the easiest way
to check if the "TO:" information is saved is to compare 2 files with
any compare utility.

Thank you for helping.


  #7  
Old June 25th 09, 08:01 AM posted to microsoft.public.outlook.program_vba
Yevgen[_2_]
external usenet poster
 
Posts: 3
Default Redemption MessageItem SaveAs problem

I have tried to run Import function using Redemption.RDOMail object
and result is the same. For files from main Exchange folder "To:"
field is OK, but for files from additional Exchange folders "To:"
field is empty.

Do you have some ideas how I can solve this problem. Maybe somehow add
to information in TNEF file programmatic. When I'm saving object to
file, object contain "To:" information and I can get it.


"Dmitry Streblechenko" wrote:

Hmmm... Normally, the PR_DISPLAY_TO property is not saved at all since it is
computed from the contents of the recipeints table.
Does it work if you import teh TENF file using RDOMail rather than
MailItem/SafeMailItem, which may overwrite the imported recipients.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Yevgen" wrote in message
...
On Jun 1, 10:42 pm, "Dmitry Streblechenko" wrote:
Hmmm... Redemption does not create the TNEF attachment itself, it rather
asks MAPI to do that.
How do you open and check the resulting TNEF files?

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

...
On May 29, 12:18 am, "Dmitry Streblechenko"
wrote:



Are you using the MAPIUtils object (which is deprecated)?
Use RDOSession object instead: sets its MAPIOBJECT property to
Application.Session.MAPIOBJECT proeprty from OOM (if you work with it)
or
call Logon.
You can then reopen the message using RDOSession.GetMessageFromId, then
save
the rerurned message (RDOMail.Save).


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


...


Hello,


I have problem with Redemption SaveAs method for MessageItem object.


I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To" property
is set correctly.


Please consult me with TNEF, also maybe it's a bug of SaveAs method in
Redemption library.


Thank you very much!


I have changed my code. So now I'm using RDOSession object instead of
MapiUtils.
Here is my code:

Dim oMsgItem As Redemption.RDOMail

Set oMsgItem = oRDOSession.GetMessageFromID(sItemEntryID)

oMsgItem .SaveAs sSaveAs, lType

Where lType = 1025 (TNEF)

But still I received the same problem. Items from Logged in user
mailbox has "To" field data and items from additional Exchange
mailboxes don't.

What the problem is? How can I fix it?

Thanks!


Hello Dmitry,

There is 2 variants how I'm opening these files.

1. Simple through text editor. and when you will compare 2 files you
will see that one of them contains "To:" information, another one not.
2. I have special application which open this files through Outlook.
Here is sample code:

Set oOlItem = oFolder.Items.Add(olPostItem)

Set oSafeItem = CreateObject("Redemption.SafeMailItem")

Set oOlItem = oOutlook.CreateItemFromTemplate(sSaveDir &
MESSAGE_TEMP_FILE, oFolder)

oOlItem.Save

Set oSafeItem.Item = oOlItem

oSafeItem.Import sSaveDir & MESSAGE_TEMP_FILE, iType

oSafeItem.Save

StrEntryID = oSafeItem.EntryID

Set oOlItem = Nothing
Set oSafeItem = Nothing

Set oSafeItem = oNamespace.Session.GetItemFromID(StrEntryID,
oFolder.StoreID)

oSafeItem.Display

So with both variants I have the same result. I think the easiest way
to check if the "TO:" information is saved is to compare 2 files with
any compare utility.

Thank you for helping.



  #8  
Old June 25th 09, 08:06 AM posted to microsoft.public.outlook.program_vba
Yevgen[_2_]
external usenet poster
 
Posts: 3
Default Redemption MessageItem SaveAs problem

Hello Dmitry,

I have found nice function OpenTnefSreamEx to open Tnef files and
AddProps function to add different properties to it. How do you think,
is it possible to add "To:" field information using these functions?
If yes, can you give me a sample, how can I use these functions in
VisualBasic 6 program, because now I don't know how to do it even to
test this idea.

Thanks a lot!


"Yevgen" wrote:

Hello,

I have problem with Redemption SaveAs method for MessageItem object.

I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To" property
is set correctly.

Please consult me with TNEF, also maybe it's a bug of SaveAs method in
Redemption library.

Thank you very much!

  #9  
Old June 25th 09, 09:02 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Redemption MessageItem SaveAs problem

I sent an updated version to your private address...

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Yevgen" wrote in message
...
I have tried to run Import function using Redemption.RDOMail object
and result is the same. For files from main Exchange folder "To:"
field is OK, but for files from additional Exchange folders "To:"
field is empty.

Do you have some ideas how I can solve this problem. Maybe somehow add
to information in TNEF file programmatic. When I'm saving object to
file, object contain "To:" information and I can get it.


"Dmitry Streblechenko" wrote:

Hmmm... Normally, the PR_DISPLAY_TO property is not saved at all since it
is
computed from the contents of the recipeints table.
Does it work if you import teh TENF file using RDOMail rather than
MailItem/SafeMailItem, which may overwrite the imported recipients.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Yevgen" wrote in message
...
On Jun 1, 10:42 pm, "Dmitry Streblechenko" wrote:
Hmmm... Redemption does not create the TNEF attachment itself, it
rather
asks MAPI to do that.
How do you open and check the resulting TNEF files?

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

...
On May 29, 12:18 am, "Dmitry Streblechenko"
wrote:



Are you using the MAPIUtils object (which is deprecated)?
Use RDOSession object instead: sets its MAPIOBJECT property to
Application.Session.MAPIOBJECT proeprty from OOM (if you work with
it)
or
call Logon.
You can then reopen the message using RDOSession.GetMessageFromId,
then
save
the rerurned message (RDOMail.Save).

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

...

Hello,

I have problem with Redemption SaveAs method for MessageItem
object.

I'm saving items in olTNEF (1025) format. This problem occurs whits
mail items. I'm saving items fro Exchange Server mailboxes. When
I'm
saving item of current Logged in to Outlook user "To" property is
saved ok, but when I'm saving items from not Logged in user mailbox
(Additional Exchange mailbox), "To" property is blank. But when I'm
opening this item in Outlook, "To" field is not empty. Also before
executing SaveAs method, I have checked item object and "To"
property
is set correctly.

Please consult me with TNEF, also maybe it's a bug of SaveAs method
in
Redemption library.

Thank you very much!

I have changed my code. So now I'm using RDOSession object instead of
MapiUtils.
Here is my code:

Dim oMsgItem As Redemption.RDOMail

Set oMsgItem = oRDOSession.GetMessageFromID(sItemEntryID)

oMsgItem .SaveAs sSaveAs, lType

Where lType = 1025 (TNEF)

But still I received the same problem. Items from Logged in user
mailbox has "To" field data and items from additional Exchange
mailboxes don't.

What the problem is? How can I fix it?

Thanks!


Hello Dmitry,

There is 2 variants how I'm opening these files.

1. Simple through text editor. and when you will compare 2 files you
will see that one of them contains "To:" information, another one not.
2. I have special application which open this files through Outlook.
Here is sample code:

Set oOlItem = oFolder.Items.Add(olPostItem)

Set oSafeItem = CreateObject("Redemption.SafeMailItem")

Set oOlItem = oOutlook.CreateItemFromTemplate(sSaveDir &
MESSAGE_TEMP_FILE, oFolder)

oOlItem.Save

Set oSafeItem.Item = oOlItem

oSafeItem.Import sSaveDir & MESSAGE_TEMP_FILE, iType

oSafeItem.Save

StrEntryID = oSafeItem.EntryID

Set oOlItem = Nothing
Set oSafeItem = Nothing

Set oSafeItem = oNamespace.Session.GetItemFromID(StrEntryID,
oFolder.StoreID)

oSafeItem.Display

So with both variants I have the same result. I think the easiest way
to check if the "TO:" information is saved is to compare 2 files with
any compare utility.

Thank you for helping.





 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Outlook redemption saveas generating security warning dkgb Outlook and VBA 1 December 28th 07 12:39 AM
Redemption Question - showaddressbook and saveas [email protected] Outlook and VBA 5 July 7th 07 10:30 PM
Redemption SafeMailItem.SaveAs is slow [email protected] Add-ins for Outlook 5 June 22nd 07 05:59 PM
Outlook freezes on Redemption SaveAs [email protected] Add-ins for Outlook 5 April 27th 06 11:46 PM
Outlook freezes on Redemption SaveAs [email protected] Add-ins for Outlook 0 April 27th 06 04:30 PM


All times are GMT +1. The time now is 10:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.