Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / January 2006

Tip: Looking for answers? Try searching our database.

VB Macro fails on Digitally Signed Emails

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Outlook Dabbler - 25 Jan 2006 21:32 GMT
Hi All, my VB macro in Outlook fails while accessing the body of digitally
signed emails. The following line,

mystring = MailItem.Body

fails giving error pop-up saying "Run-time error '-1040171007 (c2004001)':
The operation failed"

Can somebody pl give me a clue how to get around this ? thanks a bunch !
Ken Slovak - [MVP - Outlook] - 26 Jan 2006 15:25 GMT
You cannot read signed messages from Body it will return an error. Check the
message class of the item and if it's a signed or encrypted message skip it.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi All, my VB macro in Outlook fails while accessing the body of digitally
> signed emails. The following line,
[quoted text clipped - 5 lines]
>
> Can somebody pl give me a clue how to get around this ? thanks a bunch !
Outlook Dabbler - 26 Jan 2006 16:19 GMT
Thanks Ken ! for replying back. I am using this Outlook VB code to load the
body of emails from our customers into our CRM application. Is there no way I
can get to the body of the digitally signed emails ? thanks..

regards,
Shiv Kotagal

> You cannot read signed messages from Body it will return an error. Check the
> message class of the item and if it's a signed or encrypted message skip it.
[quoted text clipped - 8 lines]
> >
> > Can somebody pl give me a clue how to get around this ? thanks a bunch !
Ken Slovak - [MVP - Outlook] - 27 Jan 2006 15:59 GMT
Not from the Body or any of the other standard methods.

What you want is actually an attachment on the item. See
http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programme
r.messaging/2005-01/0180.html

for a little more information about that.

Also see http://support.microsoft.com/?kbid=194623 for information about
detecting signed/encrypted information. It's a CDO 1.21 article but applies
to the Outlook object model also.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Thanks Ken ! for replying back. I am using this Outlook VB code to load
> the
[quoted text clipped - 4 lines]
> regards,
> Shiv Kotagal
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.