![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am trying to save messages as html files. When using .SaveAs with the
olHTML as the save as type I get 'invalid procedure call or argument' but the it works fine with other types. |
Ads |
#2
|
|||
|
|||
![]()
Is that an RTF message? Can you save the same message through teh Outlook UI
(File | Save As)? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... I am trying to save messages as html files. When using .SaveAs with the olHTML as the save as type I get 'invalid procedure call or argument' but the it works fine with other types. |
#3
|
|||
|
|||
![]()
Yes and everything works fine.
"Dmitry Streblechenko" wrote: Is that an RTF message? Can you save the same message through teh Outlook UI (File | Save As)? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... I am trying to save messages as html files. When using .SaveAs with the olHTML as the save as type I get 'invalid procedure call or argument' but the it works fine with other types. |
#4
|
|||
|
|||
![]()
What programming language are you using?
-- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... Yes and everything works fine. "Dmitry Streblechenko" wrote: Is that an RTF message? Can you save the same message through teh Outlook UI (File | Save As)? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... I am trying to save messages as html files. When using .SaveAs with the olHTML as the save as type I get 'invalid procedure call or argument' but the it works fine with other types. |
#5
|
|||
|
|||
![]()
VBScript
"Dmitry Streblechenko" wrote: What programming language are you using? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... Yes and everything works fine. "Dmitry Streblechenko" wrote: Is that an RTF message? Can you save the same message through teh Outlook UI (File | Save As)? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... I am trying to save messages as html files. When using .SaveAs with the olHTML as the save as type I get 'invalid procedure call or argument' but the it works fine with other types. |
#6
|
|||
|
|||
![]()
What are the relevant snippets of your code?
-- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... VBScript "Dmitry Streblechenko" wrote: What programming language are you using? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... Yes and everything works fine. "Dmitry Streblechenko" wrote: Is that an RTF message? Can you save the same message through teh Outlook UI (File | Save As)? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... I am trying to save messages as html files. When using .SaveAs with the olHTML as the save as type I get 'invalid procedure call or argument' but the it works fine with other types. |
#7
|
|||
|
|||
![]()
Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI") Set objFolder = objNamespace.Folders.Item("Mailbox") Set objCheckFolder = objFolder.Folders.Item('Check") Set objDOPFolder = objCheckFolder.Folders.Item("O") Set Message = objDOPFolder.Items(1) if Message.Subject = "TEST" then if Message.UnRead then strName = "C:\Desktop\EMAIL\" & Message.Subject & ".html" Message.SaveAs strName , olMSGHTML Message.UnRead = false end if end if "Dmitry Streblechenko" wrote: What are the relevant snippets of your code? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... VBScript "Dmitry Streblechenko" wrote: What programming language are you using? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... Yes and everything works fine. "Dmitry Streblechenko" wrote: Is that an RTF message? Can you save the same message through teh Outlook UI (File | Save As)? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... I am trying to save messages as html files. When using .SaveAs with the olHTML as the save as type I get 'invalid procedure call or argument' but the it works fine with other types. |
#8
|
|||
|
|||
![]()
What is olMSGHTML?
You are accessing the very first item in the folder; keep in mind the very first item in the MAPIFolder.Items collection will not necessarily be shown first (or last) in the Outlook UI. Look at the Subject property to make sure you are dealing with the expected message. I bet you have an old RTF message that Outlook refuses to save in the HTML format. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message news ![]() Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set objFolder = objNamespace.Folders.Item("Mailbox") Set objCheckFolder = objFolder.Folders.Item('Check") Set objDOPFolder = objCheckFolder.Folders.Item("O") Set Message = objDOPFolder.Items(1) if Message.Subject = "TEST" then if Message.UnRead then strName = "C:\Desktop\EMAIL\" & Message.Subject & ".html" Message.SaveAs strName , olMSGHTML Message.UnRead = false end if end if "Dmitry Streblechenko" wrote: What are the relevant snippets of your code? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... VBScript "Dmitry Streblechenko" wrote: What programming language are you using? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... Yes and everything works fine. "Dmitry Streblechenko" wrote: Is that an RTF message? Can you save the same message through teh Outlook UI (File | Save As)? -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - "ADuPlayee" wrote in message ... I am trying to save messages as html files. When using .SaveAs with the olHTML as the save as type I get 'invalid procedure call or argument' but the it works fine with other types. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MailItem SaveAs | Koen Verwimp | Add-ins for Outlook | 2 | September 22nd 08 01:41 PM |
Outlook automation SaveAs method hangs | Yashgt | Outlook - Using Forms | 0 | May 29th 08 01:58 PM |
MailItem.SaveAs method | Mrunali | Outlook - Using Forms | 0 | April 17th 07 03:16 PM |
_MailItem - SaveAs | MON205 | Add-ins for Outlook | 1 | February 22nd 07 06:01 PM |
Redemption's SafeMailItem.SaveAs method yields empty files | Alexander Bub | Outlook and VBA | 4 | August 9th 06 11:29 AM |