473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Retreiving signed / encrypted messages OL2003

Hi,

I used Outlook 2003 to progammatically read some signed/encrypted messages,
however it semms that the message collections can't return a mailitem object

oMsg = Outlook.Items.GetFirst

and returned an exception message of "Specified cast is not valid."

When I read a non-secure message, it does return a mailitem without exception.

I tried CType(Outlook.Items.GetFirst, Outlook.MailItem) and
DirectCast(Outlook.Items.GetFirst, Outlook.MailItem), but couldn't fix it.

Anybody have an ideal? Thanks

Nov 21 '05 #1
1 1287
Define oMsg as Object NOT as MailItem. It works then.

"Li Pang" wrote:
Hi,

I used Outlook 2003 to progammatically read some signed/encrypted messages,
however it semms that the message collections can't return a mailitem object

oMsg = Outlook.Items.GetFirst

and returned an exception message of "Specified cast is not valid."

When I read a non-secure message, it does return a mailitem without exception.

I tried CType(Outlook.Items.GetFirst, Outlook.MailItem) and
DirectCast(Outlook.Items.GetFirst, Outlook.MailItem), but couldn't fix it.

Anybody have an ideal? Thanks

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: RadioFreq | last post by:
I am writing an applet to display Julian Day and Time on a webpage. I have all the code written except for a class to open a socket and extract a String with the time in it. I am getting the time...
5
by: Salil | last post by:
I want to write a program that requires a password to allow the user to access it. Please suggest a nice & easy to understand (and crack) algorithm for encryption for the password ! P.S. : I said...
17
by: Christopher Dyken | last post by:
Hi group, I'm trying to implement two routines to handle 32x32-bits and 64x64-bits signed integer multiplication on a 32 bits machine in C. It easy to find descriptions of non-signed...
4
by: Fredo | last post by:
I'm not sure if this is possible, but I have a socket server app and a client app. I need to convince the server that the application is signed with the same key as the server. Is there a way to do...
1
by: Leszek | last post by:
Hello, A few weeks ago I sent a post about sending encrypted emails. I found out how to encrypt such emails using .NET, but now there is another step: How to receive them? Let's say I have...
3
by: Li Pang | last post by:
Hi, I wrote the following codes to read messages. They work fine for Outlook 2002 but fails for 2003. My felling it may be a bug of Outlook 2003. Anybody has experience on that? Thanks in...
4
by: nepdae | last post by:
Well, after reading and hunting all over the web, including here, I still haven't been successful in my attempts to resolve my situation. So, I thought maybe I'd just ask. Here's the situation: ...
1
by: MimiMi | last post by:
I'm trying to decrypt a byte array in java that was encrypted in C#. I don't get any error messages, just a result that's completely not what I was hoping for. I think I am using the same type of...
2
by: MimiMi | last post by:
I'm trying to decrypt a byte array in java that was encrypted in C#. I don't get any error messages, just a result that's completely not what I was hoping for. I think I am using the same type of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.