PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Problem in SafeMailItem.SaveAs Method
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Problem in SafeMailItem.SaveAs Method
![]() |
Problem in SafeMailItem.SaveAs Method |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
I wanted to save MailItem as OFT file . I tried the following code with redemption.dll version 3.4.0.337 it gives me warning message when I call mySafeMailItem.SaveAs method by passing Type parameter as 'OTemplate'. after that I used same code with redemption.dll version 3.4.0.402 because OTemplate support is added for SaveAs in redemption.dll version 3.4.0.402 it is not giving me any warning message but it saves the file as MSG but I am passing Type parameter as 'OTemplate'. I need help . How can I save MailItem as OFT without warning message? Thanks in advance Following is the used code -------------------------------- Dim myApp As New Outlook.Application Dim myMail As MailItem, newMail As MailItem Dim mySafeMail As Object, newSafeMail As Object Dim mtAtt As Attachments Set myMail = myApp.CreateItem(olMailItem) Set mySafeMail = CreateObject("Redemption.SafeMailItem") mySafeMail.Item = myMail mySafeMail.To = "dbhaskarreddy@hotmail.com" mySafeMail.Body = "hi this is sample mail for testing" mySafeMail.Attachments.Add ("c:\mm.bmp") mySafeMail.Attachments.Add ("c:\Sample.txt") mySafeMail.SaveAs "c:\mymail.oft" Set newMail = myApp.CreateItem(olMailItem) Set newSafeMail = CreateObject("Redemption.SafeMailItem") newSafeMail.Item = newMail newSafeMail.To = "prasadbgt@yahoo.com" newSafeMail.Attachments.Add "c:\mymail.oft" newSafeMail.Attachments.Add "C:\Contacts.xml" newSafeMail.Send -------------------------------- |
|
|
|
#2 |
|
Guest
Posts: n/a
|
OFT format is the same as MSG format with the sender, receiver and some
transport properties removed. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... > Hi, > > I wanted to save MailItem as OFT file . > > I tried the following code with redemption.dll version 3.4.0.337 > it gives me warning message when I call mySafeMailItem.SaveAs method by > passing Type parameter as 'OTemplate'. > > after that I used same code with redemption.dll version 3.4.0.402 > because OTemplate support is added for SaveAs in redemption.dll version > 3.4.0.402 > > it is not giving me any warning message but it saves the file as MSG > but I am passing Type parameter as 'OTemplate'. > > I need help . > How can I save MailItem as OFT without warning message? > > Thanks in advance > > Following is the used code > -------------------------------- > > Dim myApp As New Outlook.Application > Dim myMail As MailItem, newMail As MailItem > Dim mySafeMail As Object, newSafeMail As Object > Dim mtAtt As Attachments > > Set myMail = myApp.CreateItem(olMailItem) > Set mySafeMail = CreateObject("Redemption.SafeMailItem") > mySafeMail.Item = myMail > mySafeMail.To = "dbhaskarreddy@hotmail.com" > mySafeMail.Body = "hi this is sample mail for testing" > mySafeMail.Attachments.Add ("c:\mm.bmp") > mySafeMail.Attachments.Add ("c:\Sample.txt") > mySafeMail.SaveAs "c:\mymail.oft" > > Set newMail = myApp.CreateItem(olMailItem) > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > newSafeMail.Item = newMail > newSafeMail.To = "prasadbgt@yahoo.com" > newSafeMail.Attachments.Add "c:\mymail.oft" > newSafeMail.Attachments.Add "C:\Contacts.xml" > > newSafeMail.Send > > -------------------------------- |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Hi,
Thanks for that reply. But I want that sender,receiver name on that saved mail to use further process. Is there any way to save MailItem as OFT format without warning mesage I am confuse because I used Redemption.dll and till it is giving warning message on the following line mySafeMailItem.SaveAs "c:\mymail.oft",oTemplate Need your help to solve this problem Waiting for your such kind reply Thanks in advance again "Dmitry Streblechenko" wrote: > OFT format is the same as MSG format with the sender, receiver and some > transport properties removed. > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/ > OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message > news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... > > Hi, > > > > I wanted to save MailItem as OFT file . > > > > I tried the following code with redemption.dll version 3.4.0.337 > > it gives me warning message when I call mySafeMailItem.SaveAs method by > > passing Type parameter as 'OTemplate'. > > > > after that I used same code with redemption.dll version 3.4.0.402 > > because OTemplate support is added for SaveAs in redemption.dll version > > 3.4.0.402 > > > > it is not giving me any warning message but it saves the file as MSG > > but I am passing Type parameter as 'OTemplate'. > > > > I need help . > > How can I save MailItem as OFT without warning message? > > > > Thanks in advance > > > > Following is the used code > > -------------------------------- > > > > Dim myApp As New Outlook.Application > > Dim myMail As MailItem, newMail As MailItem > > Dim mySafeMail As Object, newSafeMail As Object > > Dim mtAtt As Attachments > > > > Set myMail = myApp.CreateItem(olMailItem) > > Set mySafeMail = CreateObject("Redemption.SafeMailItem") > > mySafeMail.Item = myMail > > mySafeMail.To = "dbhaskarreddy@hotmail.com" > > mySafeMail.Body = "hi this is sample mail for testing" > > mySafeMail.Attachments.Add ("c:\mm.bmp") > > mySafeMail.Attachments.Add ("c:\Sample.txt") > > mySafeMail.SaveAs "c:\mymail.oft" > > > > Set newMail = myApp.CreateItem(olMailItem) > > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > > newSafeMail.Item = newMail > > newSafeMail.To = "prasadbgt@yahoo.com" > > newSafeMail.Attachments.Add "c:\mymail.oft" > > newSafeMail.Attachments.Add "C:\Contacts.xml" > > > > newSafeMail.Send > > > > -------------------------------- > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
If you need to save sender/receiver/etc properties, save in the MSG format,
not OFT. What version of Redemption are you using? The latest version (3.4.0.402) added the olTemplate format support. Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message news:0CB3C747-0A95-4ECC-975A-3179742D3B4A@microsoft.com... > Hi, > > Thanks for that reply. > > But I want that sender,receiver name on that saved mail to use further > process. > Is there any way to save MailItem as OFT format without warning mesage > > I am confuse because I used Redemption.dll and till it is giving warning > message on the following line > > mySafeMailItem.SaveAs "c:\mymail.oft",oTemplate > > Need your help to solve this problem > > Waiting for your such kind reply > > Thanks in advance again > > "Dmitry Streblechenko" wrote: > >> OFT format is the same as MSG format with the sender, receiver and some >> transport properties removed. >> >> Dmitry Streblechenko (MVP) >> http://www.dimastr.com/ >> OutlookSpy - Outlook, CDO >> and MAPI Developer Tool >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> message >> news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... >> > Hi, >> > >> > I wanted to save MailItem as OFT file . >> > >> > I tried the following code with redemption.dll version 3.4.0.337 >> > it gives me warning message when I call mySafeMailItem.SaveAs method by >> > passing Type parameter as 'OTemplate'. >> > >> > after that I used same code with redemption.dll version 3.4.0.402 >> > because OTemplate support is added for SaveAs in redemption.dll version >> > 3.4.0.402 >> > >> > it is not giving me any warning message but it saves the file as MSG >> > but I am passing Type parameter as 'OTemplate'. >> > >> > I need help . >> > How can I save MailItem as OFT without warning message? >> > >> > Thanks in advance >> > >> > Following is the used code >> > -------------------------------- >> > >> > Dim myApp As New Outlook.Application >> > Dim myMail As MailItem, newMail As MailItem >> > Dim mySafeMail As Object, newSafeMail As Object >> > Dim mtAtt As Attachments >> > >> > Set myMail = myApp.CreateItem(olMailItem) >> > Set mySafeMail = CreateObject("Redemption.SafeMailItem") >> > mySafeMail.Item = myMail >> > mySafeMail.To = "dbhaskarreddy@hotmail.com" >> > mySafeMail.Body = "hi this is sample mail for testing" >> > mySafeMail.Attachments.Add ("c:\mm.bmp") >> > mySafeMail.Attachments.Add ("c:\Sample.txt") >> > mySafeMail.SaveAs "c:\mymail.oft" >> > >> > Set newMail = myApp.CreateItem(olMailItem) >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") >> > newSafeMail.Item = newMail >> > newSafeMail.To = "prasadbgt@yahoo.com" >> > newSafeMail.Attachments.Add "c:\mymail.oft" >> > newSafeMail.Attachments.Add "C:\Contacts.xml" >> > >> > newSafeMail.Send >> > >> > -------------------------------- >> >> >> |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Hi,
I used Redemption version 3.4.0.402 also. With this version it is also giving warning message for following line mySafeMail.SaveAs "C:\mymail.oft", olTemplate and also when I used HtmlBody property of SafeMailItem What is the problem? I am not getting anything . Need your help. here is my code ------------------------------ Dim myApp As New Outlook.Application Dim myMail As MailItem, newMail As MailItem Dim mySafeMail As Object, newSafeMail As Object Dim mtAtt As Attachments Dim curMailItem As MailItem Dim oInsecptor As Inspector Dim Str As String Set oInsecptor = myApp.ActiveInspector Set curMailItem = oInsecptor.CurrentItem Set mySafeMail = oInsecptor.CurrentItem Str = curMailItem.HTMLBody mySafeMail.Body = Str mySafeMail.SaveAs "C:\mymail.oft", olTemplate Set newMail = myApp.CreateItem(olMailItem) Set newSafeMail = CreateObject("Redemption.SafeMailItem") newSafeMail.Item = newMail newSafeMail.To = "prasad.bhagwat@extentia.com" newSafeMail.Attachments.Add "c:\mymail.oft" newSafeMail.Attachments.Add "C:\Documents and Settings\prasad.bhagwat\My Documents\CodeACT7\Contacts.xml" newSafeMail.Send ------------------------------ "Dmitry Streblechenko" wrote: > If you need to save sender/receiver/etc properties, save in the MSG format, > not OFT. > What version of Redemption are you using? The latest version (3.4.0.402) > added the olTemplate format support. > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/ > OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message > news:0CB3C747-0A95-4ECC-975A-3179742D3B4A@microsoft.com... > > Hi, > > > > Thanks for that reply. > > > > But I want that sender,receiver name on that saved mail to use further > > process. > > Is there any way to save MailItem as OFT format without warning mesage > > > > I am confuse because I used Redemption.dll and till it is giving warning > > message on the following line > > > > mySafeMailItem.SaveAs "c:\mymail.oft",oTemplate > > > > Need your help to solve this problem > > > > Waiting for your such kind reply > > > > Thanks in advance again > > > > "Dmitry Streblechenko" wrote: > > > >> OFT format is the same as MSG format with the sender, receiver and some > >> transport properties removed. > >> > >> Dmitry Streblechenko (MVP) > >> http://www.dimastr.com/ > >> OutlookSpy - Outlook, CDO > >> and MAPI Developer Tool > >> > >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in > >> message > >> news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... > >> > Hi, > >> > > >> > I wanted to save MailItem as OFT file . > >> > > >> > I tried the following code with redemption.dll version 3.4.0.337 > >> > it gives me warning message when I call mySafeMailItem.SaveAs method by > >> > passing Type parameter as 'OTemplate'. > >> > > >> > after that I used same code with redemption.dll version 3.4.0.402 > >> > because OTemplate support is added for SaveAs in redemption.dll version > >> > 3.4.0.402 > >> > > >> > it is not giving me any warning message but it saves the file as MSG > >> > but I am passing Type parameter as 'OTemplate'. > >> > > >> > I need help . > >> > How can I save MailItem as OFT without warning message? > >> > > >> > Thanks in advance > >> > > >> > Following is the used code > >> > -------------------------------- > >> > > >> > Dim myApp As New Outlook.Application > >> > Dim myMail As MailItem, newMail As MailItem > >> > Dim mySafeMail As Object, newSafeMail As Object > >> > Dim mtAtt As Attachments > >> > > >> > Set myMail = myApp.CreateItem(olMailItem) > >> > Set mySafeMail = CreateObject("Redemption.SafeMailItem") > >> > mySafeMail.Item = myMail > >> > mySafeMail.To = "dbhaskarreddy@hotmail.com" > >> > mySafeMail.Body = "hi this is sample mail for testing" > >> > mySafeMail.Attachments.Add ("c:\mm.bmp") > >> > mySafeMail.Attachments.Add ("c:\Sample.txt") > >> > mySafeMail.SaveAs "c:\mymail.oft" > >> > > >> > Set newMail = myApp.CreateItem(olMailItem) > >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > >> > newSafeMail.Item = newMail > >> > newSafeMail.To = "prasadbgt@yahoo.com" > >> > newSafeMail.Attachments.Add "c:\mymail.oft" > >> > newSafeMail.Attachments.Add "C:\Contacts.xml" > >> > > >> > newSafeMail.Send > >> > > >> > -------------------------------- > >> > >> > >> > > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
Your code (at least its first part) does not use Redemption at all. Replace
the line Set mySafeMail = oInsecptor.CurrentItem with Set mySafeMail = CreateObject("Redemption.SafeMailItem") mySafeMail.Item = oInsecptor.CurrentItem Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message news:008654C7-137D-475C-B9C8-167D2ABA8BC8@microsoft.com... > Hi, > > I used Redemption version 3.4.0.402 also. > With this version it is also giving warning message for following line > > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > and also when I used HtmlBody property of SafeMailItem > > What is the problem? > I am not getting anything . > Need your help. > > here is my code > > ------------------------------ > > Dim myApp As New Outlook.Application > Dim myMail As MailItem, newMail As MailItem > Dim mySafeMail As Object, newSafeMail As Object > Dim mtAtt As Attachments > Dim curMailItem As MailItem > Dim oInsecptor As Inspector > Dim Str As String > > Set oInsecptor = myApp.ActiveInspector > Set curMailItem = oInsecptor.CurrentItem > > Set mySafeMail = oInsecptor.CurrentItem > Str = curMailItem.HTMLBody > > mySafeMail.Body = Str > > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > Set newMail = myApp.CreateItem(olMailItem) > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > newSafeMail.Item = newMail > newSafeMail.To = "prasad.bhagwat@extentia.com" > newSafeMail.Attachments.Add "c:\mymail.oft" > newSafeMail.Attachments.Add "C:\Documents and Settings\prasad.bhagwat\My > Documents\CodeACT7\Contacts.xml" > > newSafeMail.Send > ------------------------------ > > > > "Dmitry Streblechenko" wrote: > >> If you need to save sender/receiver/etc properties, save in the MSG >> format, >> not OFT. >> What version of Redemption are you using? The latest version (3.4.0.402) >> added the olTemplate format support. >> >> Dmitry Streblechenko (MVP) >> http://www.dimastr.com/ >> OutlookSpy - Outlook, CDO >> and MAPI Developer Tool >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> message >> news:0CB3C747-0A95-4ECC-975A-3179742D3B4A@microsoft.com... >> > Hi, >> > >> > Thanks for that reply. >> > >> > But I want that sender,receiver name on that saved mail to use further >> > process. >> > Is there any way to save MailItem as OFT format without warning mesage >> > >> > I am confuse because I used Redemption.dll and till it is giving >> > warning >> > message on the following line >> > >> > mySafeMailItem.SaveAs "c:\mymail.oft",oTemplate >> > >> > Need your help to solve this problem >> > >> > Waiting for your such kind reply >> > >> > Thanks in advance again >> > >> > "Dmitry Streblechenko" wrote: >> > >> >> OFT format is the same as MSG format with the sender, receiver and >> >> some >> >> transport properties removed. >> >> >> >> Dmitry Streblechenko (MVP) >> >> http://www.dimastr.com/ >> >> OutlookSpy - Outlook, CDO >> >> and MAPI Developer Tool >> >> >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> >> message >> >> news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... >> >> > Hi, >> >> > >> >> > I wanted to save MailItem as OFT file . >> >> > >> >> > I tried the following code with redemption.dll version 3.4.0.337 >> >> > it gives me warning message when I call mySafeMailItem.SaveAs method >> >> > by >> >> > passing Type parameter as 'OTemplate'. >> >> > >> >> > after that I used same code with redemption.dll version 3.4.0.402 >> >> > because OTemplate support is added for SaveAs in redemption.dll >> >> > version >> >> > 3.4.0.402 >> >> > >> >> > it is not giving me any warning message but it saves the file as MSG >> >> > but I am passing Type parameter as 'OTemplate'. >> >> > >> >> > I need help . >> >> > How can I save MailItem as OFT without warning message? >> >> > >> >> > Thanks in advance >> >> > >> >> > Following is the used code >> >> > -------------------------------- >> >> > >> >> > Dim myApp As New Outlook.Application >> >> > Dim myMail As MailItem, newMail As MailItem >> >> > Dim mySafeMail As Object, newSafeMail As Object >> >> > Dim mtAtt As Attachments >> >> > >> >> > Set myMail = myApp.CreateItem(olMailItem) >> >> > Set mySafeMail = CreateObject("Redemption.SafeMailItem") >> >> > mySafeMail.Item = myMail >> >> > mySafeMail.To = "dbhaskarreddy@hotmail.com" >> >> > mySafeMail.Body = "hi this is sample mail for testing" >> >> > mySafeMail.Attachments.Add ("c:\mm.bmp") >> >> > mySafeMail.Attachments.Add ("c:\Sample.txt") >> >> > mySafeMail.SaveAs "c:\mymail.oft" >> >> > >> >> > Set newMail = myApp.CreateItem(olMailItem) >> >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") >> >> > newSafeMail.Item = newMail >> >> > newSafeMail.To = "prasadbgt@yahoo.com" >> >> > newSafeMail.Attachments.Add "c:\mymail.oft" >> >> > newSafeMail.Attachments.Add "C:\Contacts.xml" >> >> > >> >> > newSafeMail.Send >> >> > >> >> > -------------------------------- >> >> >> >> >> >> >> >> >> |
|
|
|
#7 |
|
Guest
Posts: n/a
|
HI,
Thanks for that change suggested. But I used that code also. Those lines are giving me warning messages mySafeMail.SaveAs "C:\mymail.oft", olTemplate and also this line mySafeMail.Body = mySafeMail.HTMLBody I wanted mail body as html I also tried MailItem.BodyFormat=olFormatHTML but it is not giving me required result. Need help from you to solve this warning message problem Currently I am using Redemption version 3.4.0.337 But I tried the same code with Redemption version 3.4.0.402 ,which I downloaded from Redemptions site http://www.dimastr.com/redemption This is Developer Version I downloaded for checking. Following is the code used recently --------------------------- Dim myApp As New Outlook.Application Dim myMail As MailItem, newMail As MailItem Dim mySafeMail As Object, newSafeMail As Object Dim mtAtt As Attachments Dim curMailItem As MailItem Dim oInsecptor As Inspector Set oInsecptor = myApp.ActiveInspector Set mySafeMail = oInsecptor.CurrentItem mySafeMail.Body = mySafeMail.HTMLBody mySafeMail.SaveAs "C:\mymail.oft", olTemplate Set newMail = myApp.CreateItem(olMailItem) Set newSafeMail = CreateObject("Redemption.SafeMailItem") newSafeMail.Item = newMail newSafeMail.To = "prasadbgt@yahoo.com" newSafeMail.Attachments.Add "c:\mymail.oft" Documents\CodeACT7\Contacts.xml" newSafeMail.Send --------------------------- "Dmitry Streblechenko" wrote: > Your code (at least its first part) does not use Redemption at all. Replace > the line > > Set mySafeMail = oInsecptor.CurrentItem > > with > > Set mySafeMail = CreateObject("Redemption.SafeMailItem") > mySafeMail.Item = oInsecptor.CurrentItem > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/ > OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message > news:008654C7-137D-475C-B9C8-167D2ABA8BC8@microsoft.com... > > Hi, > > > > I used Redemption version 3.4.0.402 also. > > With this version it is also giving warning message for following line > > > > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > > > and also when I used HtmlBody property of SafeMailItem > > > > What is the problem? > > I am not getting anything . > > Need your help. > > > > here is my code > > > > ------------------------------ > > > > Dim myApp As New Outlook.Application > > Dim myMail As MailItem, newMail As MailItem > > Dim mySafeMail As Object, newSafeMail As Object > > Dim mtAtt As Attachments > > Dim curMailItem As MailItem > > Dim oInsecptor As Inspector > > Dim Str As String > > > > Set oInsecptor = myApp.ActiveInspector > > Set curMailItem = oInsecptor.CurrentItem > > > > Set mySafeMail = oInsecptor.CurrentItem > > Str = curMailItem.HTMLBody > > > > mySafeMail.Body = Str > > > > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > > > Set newMail = myApp.CreateItem(olMailItem) > > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > > newSafeMail.Item = newMail > > newSafeMail.To = "prasad.bhagwat@extentia.com" > > newSafeMail.Attachments.Add "c:\mymail.oft" > > newSafeMail.Attachments.Add "C:\Documents and Settings\prasad.bhagwat\My > > Documents\CodeACT7\Contacts.xml" > > > > newSafeMail.Send > > ------------------------------ > > > > > > > > "Dmitry Streblechenko" wrote: > > > >> If you need to save sender/receiver/etc properties, save in the MSG > >> format, > >> not OFT. > >> What version of Redemption are you using? The latest version (3.4.0.402) > >> added the olTemplate format support. > >> > >> Dmitry Streblechenko (MVP) > >> http://www.dimastr.com/ > >> OutlookSpy - Outlook, CDO > >> and MAPI Developer Tool > >> > >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in > >> message > >> news:0CB3C747-0A95-4ECC-975A-3179742D3B4A@microsoft.com... > >> > Hi, > >> > > >> > Thanks for that reply. > >> > > >> > But I want that sender,receiver name on that saved mail to use further > >> > process. > >> > Is there any way to save MailItem as OFT format without warning mesage > >> > > >> > I am confuse because I used Redemption.dll and till it is giving > >> > warning > >> > message on the following line > >> > > >> > mySafeMailItem.SaveAs "c:\mymail.oft",oTemplate > >> > > >> > Need your help to solve this problem > >> > > >> > Waiting for your such kind reply > >> > > >> > Thanks in advance again > >> > > >> > "Dmitry Streblechenko" wrote: > >> > > >> >> OFT format is the same as MSG format with the sender, receiver and > >> >> some > >> >> transport properties removed. > >> >> > >> >> Dmitry Streblechenko (MVP) > >> >> http://www.dimastr.com/ > >> >> OutlookSpy - Outlook, CDO > >> >> and MAPI Developer Tool > >> >> > >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in > >> >> message > >> >> news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... > >> >> > Hi, > >> >> > > >> >> > I wanted to save MailItem as OFT file . > >> >> > > >> >> > I tried the following code with redemption.dll version 3.4.0.337 > >> >> > it gives me warning message when I call mySafeMailItem.SaveAs method > >> >> > by > >> >> > passing Type parameter as 'OTemplate'. > >> >> > > >> >> > after that I used same code with redemption.dll version 3.4.0.402 > >> >> > because OTemplate support is added for SaveAs in redemption.dll > >> >> > version > >> >> > 3.4.0.402 > >> >> > > >> >> > it is not giving me any warning message but it saves the file as MSG > >> >> > but I am passing Type parameter as 'OTemplate'. > >> >> > > >> >> > I need help . > >> >> > How can I save MailItem as OFT without warning message? > >> >> > > >> >> > Thanks in advance > >> >> > > >> >> > Following is the used code > >> >> > -------------------------------- > >> >> > > >> >> > Dim myApp As New Outlook.Application > >> >> > Dim myMail As MailItem, newMail As MailItem > >> >> > Dim mySafeMail As Object, newSafeMail As Object > >> >> > Dim mtAtt As Attachments > >> >> > > >> >> > Set myMail = myApp.CreateItem(olMailItem) > >> >> > Set mySafeMail = CreateObject("Redemption.SafeMailItem") > >> >> > mySafeMail.Item = myMail > >> >> > mySafeMail.To = "dbhaskarreddy@hotmail.com" > >> >> > mySafeMail.Body = "hi this is sample mail for testing" > >> >> > mySafeMail.Attachments.Add ("c:\mm.bmp") > >> >> > mySafeMail.Attachments.Add ("c:\Sample.txt") > >> >> > mySafeMail.SaveAs "c:\mymail.oft" > >> >> > > >> >> > Set newMail = myApp.CreateItem(olMailItem) > >> >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > >> >> > newSafeMail.Item = newMail > >> >> > newSafeMail.To = "prasadbgt@yahoo.com" > >> >> > newSafeMail.Attachments.Add "c:\mymail.oft" > >> >> > newSafeMail.Attachments.Add "C:\Contacts.xml" > >> >> > > >> >> > newSafeMail.Send > >> >> > > >> >> > -------------------------------- > >> >> > >> >> > >> >> > >> > >> > >> > > > |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Your code still does not use Redemption. Did you try to do what I suggested
in my previous post? Dim myApp As New Outlook.Application Dim myMail As MailItem, newMail As MailItem Dim mySafeMail As Object, newSafeMail As Object Dim mtAtt As Attachments Dim curMailItem As MailItem Dim oInsecptor As Inspector Set oInsecptor = myApp.ActiveInspector 'modified code Set mySafeMail = CreateObject("Redemption.SafeMailItem") mySafeMail.Item = oInsecptor.CurrentItem ' mySafeMail.Body = mySafeMail.HTMLBody mySafeMail.SaveAs "C:\mymail.oft", olTemplate Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message news:64D7C215-6E3A-4F1C-83DD-E7DB82940BE3@microsoft.com... > HI, > > Thanks for that change suggested. > > But I used that code also. > > Those lines are giving me warning messages > > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > and also this line > > mySafeMail.Body = mySafeMail.HTMLBody > > I wanted mail body as html > I also tried MailItem.BodyFormat=olFormatHTML but it is not giving me > required result. > > Need help from you to solve this warning message problem > Currently I am using Redemption version 3.4.0.337 > > But I tried the same code with Redemption version 3.4.0.402 ,which I > downloaded from Redemptions site http://www.dimastr.com/redemption > This is Developer Version I downloaded for checking. > > Following is the code used recently > > --------------------------- > > Dim myApp As New Outlook.Application > Dim myMail As MailItem, newMail As MailItem > Dim mySafeMail As Object, newSafeMail As Object > Dim mtAtt As Attachments > Dim curMailItem As MailItem > Dim oInsecptor As Inspector > > Set oInsecptor = myApp.ActiveInspector > Set mySafeMail = oInsecptor.CurrentItem > mySafeMail.Body = mySafeMail.HTMLBody > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > > Set newMail = myApp.CreateItem(olMailItem) > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > newSafeMail.Item = newMail > newSafeMail.To = "prasadbgt@yahoo.com" > > newSafeMail.Attachments.Add "c:\mymail.oft" > Documents\CodeACT7\Contacts.xml" > > newSafeMail.Send > --------------------------- > > > "Dmitry Streblechenko" wrote: > >> Your code (at least its first part) does not use Redemption at all. >> Replace >> the line >> >> Set mySafeMail = oInsecptor.CurrentItem >> >> with >> >> Set mySafeMail = CreateObject("Redemption.SafeMailItem") >> mySafeMail.Item = oInsecptor.CurrentItem >> >> Dmitry Streblechenko (MVP) >> http://www.dimastr.com/ >> OutlookSpy - Outlook, CDO >> and MAPI Developer Tool >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> message >> news:008654C7-137D-475C-B9C8-167D2ABA8BC8@microsoft.com... >> > Hi, >> > >> > I used Redemption version 3.4.0.402 also. >> > With this version it is also giving warning message for following line >> > >> > mySafeMail.SaveAs "C:\mymail.oft", olTemplate >> > >> > and also when I used HtmlBody property of SafeMailItem >> > >> > What is the problem? >> > I am not getting anything . >> > Need your help. >> > >> > here is my code >> > >> > ------------------------------ >> > >> > Dim myApp As New Outlook.Application >> > Dim myMail As MailItem, newMail As MailItem >> > Dim mySafeMail As Object, newSafeMail As Object >> > Dim mtAtt As Attachments >> > Dim curMailItem As MailItem >> > Dim oInsecptor As Inspector >> > Dim Str As String >> > >> > Set oInsecptor = myApp.ActiveInspector >> > Set curMailItem = oInsecptor.CurrentItem >> > >> > Set mySafeMail = oInsecptor.CurrentItem >> > Str = curMailItem.HTMLBody >> > >> > mySafeMail.Body = Str >> > >> > mySafeMail.SaveAs "C:\mymail.oft", olTemplate >> > >> > Set newMail = myApp.CreateItem(olMailItem) >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") >> > newSafeMail.Item = newMail >> > newSafeMail.To = "prasad.bhagwat@extentia.com" >> > newSafeMail.Attachments.Add "c:\mymail.oft" >> > newSafeMail.Attachments.Add "C:\Documents and >> > Settings\prasad.bhagwat\My >> > Documents\CodeACT7\Contacts.xml" >> > >> > newSafeMail.Send >> > ------------------------------ >> > >> > >> > >> > "Dmitry Streblechenko" wrote: >> > >> >> If you need to save sender/receiver/etc properties, save in the MSG >> >> format, >> >> not OFT. >> >> What version of Redemption are you using? The latest version >> >> (3.4.0.402) >> >> added the olTemplate format support. >> >> >> >> Dmitry Streblechenko (MVP) >> >> http://www.dimastr.com/ >> >> OutlookSpy - Outlook, CDO >> >> and MAPI Developer Tool >> >> >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> >> message >> >> news:0CB3C747-0A95-4ECC-975A-3179742D3B4A@microsoft.com... >> >> > Hi, >> >> > >> >> > Thanks for that reply. >> >> > >> >> > But I want that sender,receiver name on that saved mail to use >> >> > further >> >> > process. >> >> > Is there any way to save MailItem as OFT format without warning >> >> > mesage >> >> > >> >> > I am confuse because I used Redemption.dll and till it is giving >> >> > warning >> >> > message on the following line >> >> > >> >> > mySafeMailItem.SaveAs "c:\mymail.oft",oTemplate >> >> > >> >> > Need your help to solve this problem >> >> > >> >> > Waiting for your such kind reply >> >> > >> >> > Thanks in advance again >> >> > >> >> > "Dmitry Streblechenko" wrote: >> >> > >> >> >> OFT format is the same as MSG format with the sender, receiver and >> >> >> some >> >> >> transport properties removed. >> >> >> >> >> >> Dmitry Streblechenko (MVP) >> >> >> http://www.dimastr.com/ >> >> >> OutlookSpy - Outlook, CDO >> >> >> and MAPI Developer Tool >> >> >> >> >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> >> >> message >> >> >> news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... >> >> >> > Hi, >> >> >> > >> >> >> > I wanted to save MailItem as OFT file . >> >> >> > >> >> >> > I tried the following code with redemption.dll version 3.4.0.337 >> >> >> > it gives me warning message when I call mySafeMailItem.SaveAs >> >> >> > method >> >> >> > by >> >> >> > passing Type parameter as 'OTemplate'. >> >> >> > >> >> >> > after that I used same code with redemption.dll version 3.4.0.402 >> >> >> > because OTemplate support is added for SaveAs in redemption.dll >> >> >> > version >> >> >> > 3.4.0.402 >> >> >> > >> >> >> > it is not giving me any warning message but it saves the file as >> >> >> > MSG >> >> >> > but I am passing Type parameter as 'OTemplate'. >> >> >> > >> >> >> > I need help . >> >> >> > How can I save MailItem as OFT without warning message? >> >> >> > >> >> >> > Thanks in advance >> >> >> > >> >> >> > Following is the used code >> >> >> > -------------------------------- >> >> >> > >> >> >> > Dim myApp As New Outlook.Application >> >> >> > Dim myMail As MailItem, newMail As MailItem >> >> >> > Dim mySafeMail As Object, newSafeMail As Object >> >> >> > Dim mtAtt As Attachments >> >> >> > >> >> >> > Set myMail = myApp.CreateItem(olMailItem) >> >> >> > Set mySafeMail = CreateObject("Redemption.SafeMailItem") >> >> >> > mySafeMail.Item = myMail >> >> >> > mySafeMail.To = "dbhaskarreddy@hotmail.com" >> >> >> > mySafeMail.Body = "hi this is sample mail for testing" >> >> >> > mySafeMail.Attachments.Add ("c:\mm.bmp") >> >> >> > mySafeMail.Attachments.Add ("c:\Sample.txt") >> >> >> > mySafeMail.SaveAs "c:\mymail.oft" >> >> >> > >> >> >> > Set newMail = myApp.CreateItem(olMailItem) >> >> >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") >> >> >> > newSafeMail.Item = newMail >> >> >> > newSafeMail.To = "prasadbgt@yahoo.com" >> >> >> > newSafeMail.Attachments.Add "c:\mymail.oft" >> >> >> > newSafeMail.Attachments.Add "C:\Contacts.xml" >> >> >> > >> >> >> > newSafeMail.Send >> >> >> > >> >> >> > -------------------------------- >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> |
|
|
|
#9 |
|
Guest
Posts: n/a
|
HI,
Thanks for that code. I really missed tht code in my previous code. I tried your suggested code with Redemption version 3.4.0.402 Now it is not giving me any warning message for any line. But the SafeMailItem.Body is blank. The generated mail from the code don't have any body it is absolutly blank. How it is happening? or I am missing anything again? following is the code -------------------------- Dim myApp As New Outlook.Application Dim myMail As MailItem, newMail As MailItem Dim mySafeMail As Object, newSafeMail As Object Dim curMailItem As MailItem Dim oInsecptor As Inspector Set oInsecptor = myApp.ActiveInspector 'Set curMailItem = oInsecptor.CurrentItem ' MsgBox "After set" 'Set myMail = myApp.CreateItem(olMailItem) Set mySafeMail = CreateObject("Redemption.SafeMailItem") mySafeMail.Item = oInsecptor.CurrentItem mySafeMail.BodyFormat = olFormatHTML mySafeMail.Body = mySafeMail.HTMLBody mySafeMail.SaveAs "C:\mymail.oft", olTemplate Set newMail = myApp.CreateItem(olMailItem) Set newSafeMail = CreateObject("Redemption.SafeMailItem") newSafeMail.Item = newMail newSafeMail.To = "prasadbgt@yahoo.com.com" newSafeMail.Attachments.Add "c:\mymail.oft" newSafeMail.Send -------------------------- "Dmitry Streblechenko" wrote: > Your code still does not use Redemption. Did you try to do what I suggested > in my previous post? > > Dim myApp As New Outlook.Application > Dim myMail As MailItem, newMail As MailItem > Dim mySafeMail As Object, newSafeMail As Object > Dim mtAtt As Attachments > Dim curMailItem As MailItem > Dim oInsecptor As Inspector > > Set oInsecptor = myApp.ActiveInspector > 'modified code > Set mySafeMail = CreateObject("Redemption.SafeMailItem") > mySafeMail.Item = oInsecptor.CurrentItem > ' > mySafeMail.Body = mySafeMail.HTMLBody > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/ > OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message > news:64D7C215-6E3A-4F1C-83DD-E7DB82940BE3@microsoft.com... > > HI, > > > > Thanks for that change suggested. > > > > But I used that code also. > > > > Those lines are giving me warning messages > > > > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > > > and also this line > > > > mySafeMail.Body = mySafeMail.HTMLBody > > > > I wanted mail body as html > > I also tried MailItem.BodyFormat=olFormatHTML but it is not giving me > > required result. > > > > Need help from you to solve this warning message problem > > Currently I am using Redemption version 3.4.0.337 > > > > But I tried the same code with Redemption version 3.4.0.402 ,which I > > downloaded from Redemptions site http://www.dimastr.com/redemption > > This is Developer Version I downloaded for checking. > > > > Following is the code used recently > > > > --------------------------- > > > > Dim myApp As New Outlook.Application > > Dim myMail As MailItem, newMail As MailItem > > Dim mySafeMail As Object, newSafeMail As Object > > Dim mtAtt As Attachments > > Dim curMailItem As MailItem > > Dim oInsecptor As Inspector > > > > Set oInsecptor = myApp.ActiveInspector > > Set mySafeMail = oInsecptor.CurrentItem > > mySafeMail.Body = mySafeMail.HTMLBody > > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > > > > > Set newMail = myApp.CreateItem(olMailItem) > > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > > newSafeMail.Item = newMail > > newSafeMail.To = "prasadbgt@yahoo.com" > > > > newSafeMail.Attachments.Add "c:\mymail.oft" > > Documents\CodeACT7\Contacts.xml" > > > > newSafeMail.Send > > --------------------------- > > > > > > "Dmitry Streblechenko" wrote: > > > >> Your code (at least its first part) does not use Redemption at all. > >> Replace > >> the line > >> > >> Set mySafeMail = oInsecptor.CurrentItem > >> > >> with > >> > >> Set mySafeMail = CreateObject("Redemption.SafeMailItem") > >> mySafeMail.Item = oInsecptor.CurrentItem > >> > >> Dmitry Streblechenko (MVP) > >> http://www.dimastr.com/ > >> OutlookSpy - Outlook, CDO > >> and MAPI Developer Tool > >> > >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in > >> message > >> news:008654C7-137D-475C-B9C8-167D2ABA8BC8@microsoft.com... > >> > Hi, > >> > > >> > I used Redemption version 3.4.0.402 also. > >> > With this version it is also giving warning message for following line > >> > > >> > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > >> > > >> > and also when I used HtmlBody property of SafeMailItem > >> > > >> > What is the problem? > >> > I am not getting anything . > >> > Need your help. > >> > > >> > here is my code > >> > > >> > ------------------------------ > >> > > >> > Dim myApp As New Outlook.Application > >> > Dim myMail As MailItem, newMail As MailItem > >> > Dim mySafeMail As Object, newSafeMail As Object > >> > Dim mtAtt As Attachments > >> > Dim curMailItem As MailItem > >> > Dim oInsecptor As Inspector > >> > Dim Str As String > >> > > >> > Set oInsecptor = myApp.ActiveInspector > >> > Set curMailItem = oInsecptor.CurrentItem > >> > > >> > Set mySafeMail = oInsecptor.CurrentItem > >> > Str = curMailItem.HTMLBody > >> > > >> > mySafeMail.Body = Str > >> > > >> > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > >> > > >> > Set newMail = myApp.CreateItem(olMailItem) > >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > >> > newSafeMail.Item = newMail > >> > newSafeMail.To = "prasad.bhagwat@extentia.com" > >> > newSafeMail.Attachments.Add "c:\mymail.oft" > >> > newSafeMail.Attachments.Add "C:\Documents and > >> > Settings\prasad.bhagwat\My > >> > Documents\CodeACT7\Contacts.xml" > >> > > >> > newSafeMail.Send > >> > ------------------------------ > >> > > >> > > >> > > >> > "Dmitry Streblechenko" wrote: > >> > > >> >> If you need to save sender/receiver/etc properties, save in the MSG > >> >> format, > >> >> not OFT. > >> >> What version of Redemption are you using? The latest version > >> >> (3.4.0.402) > >> >> added the olTemplate format support. > >> >> > >> >> Dmitry Streblechenko (MVP) > >> >> http://www.dimastr.com/ > >> >> OutlookSpy - Outlook, CDO > >> >> and MAPI Developer Tool > >> >> > >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in > >> >> message > >> >> news:0CB3C747-0A95-4ECC-975A-3179742D3B4A@microsoft.com... > >> >> > Hi, > >> >> > > >> >> > Thanks for that reply. > >> >> > > >> >> > But I want that sender,receiver name on that saved mail to use > >> >> > further > >> >> > process. > >> >> > Is there any way to save MailItem as OFT format without warning > >> >> > mesage > >> >> > > >> >> > I am confuse because I used Redemption.dll and till it is giving > >> >> > warning > >> >> > message on the following line > >> >> > > >> >> > mySafeMailItem.SaveAs "c:\mymail.oft",oTemplate > >> >> > > >> >> > Need your help to solve this problem > >> >> > > >> >> > Waiting for your such kind reply > >> >> > > >> >> > Thanks in advance again > >> >> > > >> >> > "Dmitry Streblechenko" wrote: > >> >> > > >> >> >> OFT format is the same as MSG format with the sender, receiver and > >> >> >> some > >> >> >> transport properties removed. > >> >> >> > >> >> >> Dmitry Streblechenko (MVP) > >> >> >> http://www.dimastr.com/ > >> >> >> OutlookSpy - Outlook, CDO > >> >> >> and MAPI Developer Tool > >> >> >> > >> >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in > >> >> >> message > >> >> >> news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... > >> >> >> > Hi, > >> >> >> > > >> >> >> > I wanted to save MailItem as OFT file . > >> >> >> > > >> >> >> > I tried the following code with redemption.dll version 3.4.0.337 > >> >> >> > it gives me warning message when I call mySafeMailItem.SaveAs > >> >> >> > method > >> >> >> > by > >> >> >> > passing Type parameter as 'OTemplate'. > >> >> >> > > >> >> >> > after that I used same code with redemption.dll version 3.4.0.402 > >> >> >> > because OTemplate support is added for SaveAs in redemption.dll > >> >> >> > version > >> >> >> > 3.4.0.402 > >> >> >> > > >> >> >> > it is not giving me any warning message but it saves the file as > >> >> >> > MSG > >> >> >> > but I am passing Type parameter as 'OTemplate'. > >> >> >> > > >> >> >> > I need help . > >> >> >> > How can I save MailItem as OFT without warning message? > >> >> >> > > >> >> >> > Thanks in advance > >> >> >> > > >> >> >> > Following is the used code > >> >> >> > -------------------------------- > >> >> >> > > >> >> >> > Dim myApp As New Outlook.Application > >> >> >> > Dim myMail As MailItem, newMail As MailItem > >> >> >> > Dim mySafeMail As Object, newSafeMail As Object > >> >> >> > Dim mtAtt As Attachments > >> >> >> > > >> >> >> > Set myMail = myApp.CreateItem(olMailItem) > >> >> >> > Set mySafeMail = CreateObject("Redemption.SafeMailItem") > >> >> >> > mySafeMail.Item = myMail > >> >> >> > mySafeMail.To = "dbhaskarreddy@hotmail.com" > >> >> >> > mySafeMail.Body = "hi this is sample mail for testing" > >> >> >> > mySafeMail.Attachments.Add ("c:\mm.bmp") > >> >> >> > mySafeMail.Attachments.Add ("c:\Sample.txt") > >> >> >> > mySafeMail.SaveAs "c:\mymail.oft" > >> >> >> > > >> >> >> > Set newMail = myApp.CreateItem(olMailItem) > >> >> >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > >> >> >> > newSafeMail.Item = newMail > >> >> >> > newSafeMail.To = "prasadbgt@yahoo.com" > >> >> >> > newSafeMail.Attachments.Add "c:\mymail.oft" > >> >> >> > newSafeMail.Attachments.Add "C:\Contacts.xml" > >> >> >> > > >> >> >> > newSafeMail.Send > >> >> >> > > >> >> >> > -------------------------------- > >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> >> > >> > >> > >> > > > |
|
|
|
#10 |
|
Guest
Posts: n/a
|
The displayed message must be saved for Redemption (and Extended MAPI) to see the latest changes that only exist in Outlook's memory. Or use the Redemption.SafeInspector object (http://www.dimastr.com/redemption/safeinspector.htm) Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in message news:27FB3C45-15FD-4098-87BC-2860F06F6545@microsoft.com... > HI, > > Thanks for that code. > I really missed tht code in my previous code. > > I tried your suggested code with Redemption version 3.4.0.402 > Now it is not giving me any warning message for any line. > > But the SafeMailItem.Body is blank. > The generated mail from the code don't have any body it is absolutly > blank. > > How it is happening? or I am missing anything again? > > following is the code > > -------------------------- > > Dim myApp As New Outlook.Application > Dim myMail As MailItem, newMail As MailItem > Dim mySafeMail As Object, newSafeMail As Object > Dim curMailItem As MailItem > Dim oInsecptor As Inspector > > Set oInsecptor = myApp.ActiveInspector > 'Set curMailItem = oInsecptor.CurrentItem > ' MsgBox "After set" > 'Set myMail = myApp.CreateItem(olMailItem) > Set mySafeMail = CreateObject("Redemption.SafeMailItem") > > mySafeMail.Item = oInsecptor.CurrentItem > mySafeMail.BodyFormat = olFormatHTML > mySafeMail.Body = mySafeMail.HTMLBody > > mySafeMail.SaveAs "C:\mymail.oft", olTemplate > > > Set newMail = myApp.CreateItem(olMailItem) > Set newSafeMail = CreateObject("Redemption.SafeMailItem") > newSafeMail.Item = newMail > newSafeMail.To = "prasadbgt@yahoo.com.com" > > newSafeMail.Attachments.Add "c:\mymail.oft" > > newSafeMail.Send > > -------------------------- > > > "Dmitry Streblechenko" wrote: > >> Your code still does not use Redemption. Did you try to do what I >> suggested >> in my previous post? >> >> Dim myApp As New Outlook.Application >> Dim myMail As MailItem, newMail As MailItem >> Dim mySafeMail As Object, newSafeMail As Object >> Dim mtAtt As Attachments >> Dim curMailItem As MailItem >> Dim oInsecptor As Inspector >> >> Set oInsecptor = myApp.ActiveInspector >> 'modified code >> Set mySafeMail = CreateObject("Redemption.SafeMailItem") >> mySafeMail.Item = oInsecptor.CurrentItem >> ' >> mySafeMail.Body = mySafeMail.HTMLBody >> mySafeMail.SaveAs "C:\mymail.oft", olTemplate >> >> >> Dmitry Streblechenko (MVP) >> http://www.dimastr.com/ >> OutlookSpy - Outlook, CDO >> and MAPI Developer Tool >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> message >> news:64D7C215-6E3A-4F1C-83DD-E7DB82940BE3@microsoft.com... >> > HI, >> > >> > Thanks for that change suggested. >> > >> > But I used that code also. >> > >> > Those lines are giving me warning messages >> > >> > mySafeMail.SaveAs "C:\mymail.oft", olTemplate >> > >> > and also this line >> > >> > mySafeMail.Body = mySafeMail.HTMLBody >> > >> > I wanted mail body as html >> > I also tried MailItem.BodyFormat=olFormatHTML but it is not giving me >> > required result. >> > >> > Need help from you to solve this warning message problem >> > Currently I am using Redemption version 3.4.0.337 >> > >> > But I tried the same code with Redemption version 3.4.0.402 ,which I >> > downloaded from Redemptions site http://www.dimastr.com/redemption >> > This is Developer Version I downloaded for checking. >> > >> > Following is the code used recently >> > >> > --------------------------- >> > >> > Dim myApp As New Outlook.Application >> > Dim myMail As MailItem, newMail As MailItem >> > Dim mySafeMail As Object, newSafeMail As Object >> > Dim mtAtt As Attachments >> > Dim curMailItem As MailItem >> > Dim oInsecptor As Inspector >> > >> > Set oInsecptor = myApp.ActiveInspector >> > Set mySafeMail = oInsecptor.CurrentItem >> > mySafeMail.Body = mySafeMail.HTMLBody >> > mySafeMail.SaveAs "C:\mymail.oft", olTemplate >> > >> > >> > Set newMail = myApp.CreateItem(olMailItem) >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") >> > newSafeMail.Item = newMail >> > newSafeMail.To = "prasadbgt@yahoo.com" >> > >> > newSafeMail.Attachments.Add "c:\mymail.oft" >> > Documents\CodeACT7\Contacts.xml" >> > >> > newSafeMail.Send >> > --------------------------- >> > >> > >> > "Dmitry Streblechenko" wrote: >> > >> >> Your code (at least its first part) does not use Redemption at all. >> >> Replace >> >> the line >> >> >> >> Set mySafeMail = oInsecptor.CurrentItem >> >> >> >> with >> >> >> >> Set mySafeMail = CreateObject("Redemption.SafeMailItem") >> >> mySafeMail.Item = oInsecptor.CurrentItem >> >> >> >> Dmitry Streblechenko (MVP) >> >> http://www.dimastr.com/ >> >> OutlookSpy - Outlook, CDO >> >> and MAPI Developer Tool >> >> >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> >> message >> >> news:008654C7-137D-475C-B9C8-167D2ABA8BC8@microsoft.com... >> >> > Hi, >> >> > >> >> > I used Redemption version 3.4.0.402 also. >> >> > With this version it is also giving warning message for following >> >> > line >> >> > >> >> > mySafeMail.SaveAs "C:\mymail.oft", olTemplate >> >> > >> >> > and also when I used HtmlBody property of SafeMailItem >> >> > >> >> > What is the problem? >> >> > I am not getting anything . >> >> > Need your help. >> >> > >> >> > here is my code >> >> > >> >> > ------------------------------ >> >> > >> >> > Dim myApp As New Outlook.Application >> >> > Dim myMail As MailItem, newMail As MailItem >> >> > Dim mySafeMail As Object, newSafeMail As Object >> >> > Dim mtAtt As Attachments >> >> > Dim curMailItem As MailItem >> >> > Dim oInsecptor As Inspector >> >> > Dim Str As String >> >> > >> >> > Set oInsecptor = myApp.ActiveInspector >> >> > Set curMailItem = oInsecptor.CurrentItem >> >> > >> >> > Set mySafeMail = oInsecptor.CurrentItem >> >> > Str = curMailItem.HTMLBody >> >> > >> >> > mySafeMail.Body = Str >> >> > >> >> > mySafeMail.SaveAs "C:\mymail.oft", olTemplate >> >> > >> >> > Set newMail = myApp.CreateItem(olMailItem) >> >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") >> >> > newSafeMail.Item = newMail >> >> > newSafeMail.To = "prasad.bhagwat@extentia.com" >> >> > newSafeMail.Attachments.Add "c:\mymail.oft" >> >> > newSafeMail.Attachments.Add "C:\Documents and >> >> > Settings\prasad.bhagwat\My >> >> > Documents\CodeACT7\Contacts.xml" >> >> > >> >> > newSafeMail.Send >> >> > ------------------------------ >> >> > >> >> > >> >> > >> >> > "Dmitry Streblechenko" wrote: >> >> > >> >> >> If you need to save sender/receiver/etc properties, save in the MSG >> >> >> format, >> >> >> not OFT. >> >> >> What version of Redemption are you using? The latest version >> >> >> (3.4.0.402) >> >> >> added the olTemplate format support. >> >> >> >> >> >> Dmitry Streblechenko (MVP) >> >> >> http://www.dimastr.com/ >> >> >> OutlookSpy - Outlook, CDO >> >> >> and MAPI Developer Tool >> >> >> >> >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote in >> >> >> message >> >> >> news:0CB3C747-0A95-4ECC-975A-3179742D3B4A@microsoft.com... >> >> >> > Hi, >> >> >> > >> >> >> > Thanks for that reply. >> >> >> > >> >> >> > But I want that sender,receiver name on that saved mail to use >> >> >> > further >> >> >> > process. >> >> >> > Is there any way to save MailItem as OFT format without warning >> >> >> > mesage >> >> >> > >> >> >> > I am confuse because I used Redemption.dll and till it is giving >> >> >> > warning >> >> >> > message on the following line >> >> >> > >> >> >> > mySafeMailItem.SaveAs "c:\mymail.oft",oTemplate >> >> >> > >> >> >> > Need your help to solve this problem >> >> >> > >> >> >> > Waiting for your such kind reply >> >> >> > >> >> >> > Thanks in advance again >> >> >> > >> >> >> > "Dmitry Streblechenko" wrote: >> >> >> > >> >> >> >> OFT format is the same as MSG format with the sender, receiver >> >> >> >> and >> >> >> >> some >> >> >> >> transport properties removed. >> >> >> >> >> >> >> >> Dmitry Streblechenko (MVP) >> >> >> >> http://www.dimastr.com/ >> >> >> >> OutlookSpy - Outlook, CDO >> >> >> >> and MAPI Developer Tool >> >> >> >> >> >> >> >> "Prasad Bhagwat" <PrasadBhagwat@discussions.microsoft.com> wrote >> >> >> >> in >> >> >> >> message >> >> >> >> news:BF430F3F-CA4A-45A5-BA35-C40F761D98E2@microsoft.com... >> >> >> >> > Hi, >> >> >> >> > >> >> >> >> > I wanted to save MailItem as OFT file . >> >> >> >> > >> >> >> >> > I tried the following code with redemption.dll version >> >> >> >> > 3.4.0.337 >> >> >> >> > it gives me warning message when I call mySafeMailItem.SaveAs >> >> >> >> > method >> >> >> >> > by >> >> >> >> > passing Type parameter as 'OTemplate'. >> >> >> >> > >> >> >> >> > after that I used same code with redemption.dll version >> >> >> >> > 3.4.0.402 >> >> >> >> > because OTemplate support is added for SaveAs in >> >> >> >> > redemption.dll >> >> >> >> > version >> >> >> >> > 3.4.0.402 >> >> >> >> > >> >> >> >> > it is not giving me any warning message but it saves the file >> >> >> >> > as >> >> >> >> > MSG >> >> >> >> > but I am passing Type parameter as 'OTemplate'. >> >> >> >> > >> >> >> >> > I need help . >> >> >> >> > How can I save MailItem as OFT without warning message? >> >> >> >> > >> >> >> >> > Thanks in advance >> >> >> >> > >> >> >> >> > Following is the used code >> >> >> >> > -------------------------------- >> >> >> >> > >> >> >> >> > Dim myApp As New Outlook.Application >> >> >> >> > Dim myMail As MailItem, newMail As MailItem >> >> >> >> > Dim mySafeMail As Object, newSafeMail As Object >> >> >> >> > Dim mtAtt As Attachments >> >> >> >> > >> >> >> >> > Set myMail = myApp.CreateItem(olMailItem) >> >> >> >> > Set mySafeMail = CreateObject("Redemption.SafeMailItem") >> >> >> >> > mySafeMail.Item = myMail >> >> >> >> > mySafeMail.To = "dbhaskarreddy@hotmail.com" >> >> >> >> > mySafeMail.Body = "hi this is sample mail for testing" >> >> >> >> > mySafeMail.Attachments.Add ("c:\mm.bmp") >> >> >> >> > mySafeMail.Attachments.Add ("c:\Sample.txt") >> >> >> >> > mySafeMail.SaveAs "c:\mymail.oft" >> >> >> >> > >> >> >> >> > Set newMail = myApp.CreateItem(olMailItem) >> >> >> >> > Set newSafeMail = CreateObject("Redemption.SafeMailItem") >> >> >> >> > newSafeMail.Item = newMail >> >> >> >> > newSafeMail.To = "prasadbgt@yahoo.com" >> >> >> >> > newSafeMail.Attachments.Add "c:\mymail.oft" >> >> >> >> > newSafeMail.Attachments.Add "C:\Contacts.xml" >> >> >> >> > >> >> >> >> > newSafeMail.Send >> >> >> >> > >> >> >> >> > -------------------------------- >> |

Main Page 
