473,626 Members | 3,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to retreiving IPM.Note.SMIME message through Outlook 2003

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 advance

Dim oOutlook As Outlook.Applica tion
Dim oNS As Outlook.NameSpa ce
Dim oStores As Outlook.Folders
Dim oStore As Outlook.MAPIFol der
Dim oFolders As Outlook.Folders
Dim oFolder As Outlook.MAPIFol der
Dim oMsgs As Outlook.Items

oOutlook = New Outlook.Applica tion
oNS = oOutlook.Sessio n
oNS.Logon(ShowD ialog:=False, NewSession:=Fal se)

oStores = oNS.Folders

oStore = oNS.Folders.Get First()
oFolders = oStore.Folders
oFolder = oFolders.Item(" Inbox")

oMsgs = oFolder.Items

Try

' if message class is 'IPM.Note.SMIME ' failed at below line
Dim oMsg As Outlook.MailIte m = oMsgs.GetFirst ' only for 'IPM.Note' message

Dim oMsg As Object = oMsgs.GetFirst ' only for 'IPM.Note.SMIME ' message

Debug.WriteLine (oMsg.Subject)
Debug.WriteLine (oMsg.MessageCl ass)
Debug.WriteLine (oMsg.Class)
' if message class is 'IPM.Note.SMIME ' failed at below line
Debug.WriteLine (CStr(oMsg.Rece ivedTime))
Debug.WriteLine ("-----------------------")
Catch ex As Exception
Debug.WriteLine (ex.Message.ToS tring)
End Try

oNS.Logoff()
Nov 21 '05 #1
3 4948
Li,
I will check to see what I can find out.

In the mean time: Have you tried in one of the Outlook programming groups?
(this is after all a VB.NET newsgroups). One of the
microsoft.publi c.outlook.* newsgroups?

Have you tried http://www.outlookcode.com?

Hope this helps
Jay

"Li Pang" <Li****@discuss ions.microsoft. com> wrote in message
news:0D******** *************** ***********@mic rosoft.com...
| 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 advance
|
| Dim oOutlook As Outlook.Applica tion
| Dim oNS As Outlook.NameSpa ce
| Dim oStores As Outlook.Folders
| Dim oStore As Outlook.MAPIFol der
| Dim oFolders As Outlook.Folders
| Dim oFolder As Outlook.MAPIFol der
| Dim oMsgs As Outlook.Items
|
| oOutlook = New Outlook.Applica tion
| oNS = oOutlook.Sessio n
| oNS.Logon(ShowD ialog:=False, NewSession:=Fal se)
|
| oStores = oNS.Folders
|
| oStore = oNS.Folders.Get First()
| oFolders = oStore.Folders
| oFolder = oFolders.Item(" Inbox")
|
| oMsgs = oFolder.Items
|
| Try
|
| ' if message class is 'IPM.Note.SMIME ' failed at below line
| Dim oMsg As Outlook.MailIte m = oMsgs.GetFirst ' only for 'IPM.Note'
message
|
| Dim oMsg As Object = oMsgs.GetFirst ' only for 'IPM.Note.SMIME ' message
|
| Debug.WriteLine (oMsg.Subject)
| Debug.WriteLine (oMsg.MessageCl ass)
| Debug.WriteLine (oMsg.Class)
| ' if message class is 'IPM.Note.SMIME ' failed at below line
| Debug.WriteLine (CStr(oMsg.Rece ivedTime))
| Debug.WriteLine ("-----------------------")
| Catch ex As Exception
| Debug.WriteLine (ex.Message.ToS tring)
| End Try
|
| oNS.Logoff()
|
|
Nov 21 '05 #2
Jay,

I did, up to now nothing is found very useful.

"Jay B. Harlow [MVP - Outlook]" wrote:
Li,
I will check to see what I can find out.

In the mean time: Have you tried in one of the Outlook programming groups?
(this is after all a VB.NET newsgroups). One of the
microsoft.publi c.outlook.* newsgroups?

Have you tried http://www.outlookcode.com?

Hope this helps
Jay

"Li Pang" <Li****@discuss ions.microsoft. com> wrote in message
news:0D******** *************** ***********@mic rosoft.com...
| 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 advance
|
| Dim oOutlook As Outlook.Applica tion
| Dim oNS As Outlook.NameSpa ce
| Dim oStores As Outlook.Folders
| Dim oStore As Outlook.MAPIFol der
| Dim oFolders As Outlook.Folders
| Dim oFolder As Outlook.MAPIFol der
| Dim oMsgs As Outlook.Items
|
| oOutlook = New Outlook.Applica tion
| oNS = oOutlook.Sessio n
| oNS.Logon(ShowD ialog:=False, NewSession:=Fal se)
|
| oStores = oNS.Folders
|
| oStore = oNS.Folders.Get First()
| oFolders = oStore.Folders
| oFolder = oFolders.Item(" Inbox")
|
| oMsgs = oFolder.Items
|
| Try
|
| ' if message class is 'IPM.Note.SMIME ' failed at below line
| Dim oMsg As Outlook.MailIte m = oMsgs.GetFirst ' only for 'IPM.Note'
message
|
| Dim oMsg As Object = oMsgs.GetFirst ' only for 'IPM.Note.SMIME ' message
|
| Debug.WriteLine (oMsg.Subject)
| Debug.WriteLine (oMsg.MessageCl ass)
| Debug.WriteLine (oMsg.Class)
| ' if message class is 'IPM.Note.SMIME ' failed at below line
| Debug.WriteLine (CStr(oMsg.Rece ivedTime))
| Debug.WriteLine ("-----------------------")
| Catch ex As Exception
| Debug.WriteLine (ex.Message.ToS tring)
| End Try
|
| oNS.Logoff()
|
|

Nov 21 '05 #3
Jay,

Any results on this issue. I found some similar requests in the Web but
without the solution.

"Jay B. Harlow [MVP - Outlook]" wrote:
Li,
I will check to see what I can find out.

In the mean time: Have you tried in one of the Outlook programming groups?
(this is after all a VB.NET newsgroups). One of the
microsoft.publi c.outlook.* newsgroups?

Have you tried http://www.outlookcode.com?

Hope this helps
Jay

"Li Pang" <Li****@discuss ions.microsoft. com> wrote in message
news:0D******** *************** ***********@mic rosoft.com...
| 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 advance
|
| Dim oOutlook As Outlook.Applica tion
| Dim oNS As Outlook.NameSpa ce
| Dim oStores As Outlook.Folders
| Dim oStore As Outlook.MAPIFol der
| Dim oFolders As Outlook.Folders
| Dim oFolder As Outlook.MAPIFol der
| Dim oMsgs As Outlook.Items
|
| oOutlook = New Outlook.Applica tion
| oNS = oOutlook.Sessio n
| oNS.Logon(ShowD ialog:=False, NewSession:=Fal se)
|
| oStores = oNS.Folders
|
| oStore = oNS.Folders.Get First()
| oFolders = oStore.Folders
| oFolder = oFolders.Item(" Inbox")
|
| oMsgs = oFolder.Items
|
| Try
|
| ' if message class is 'IPM.Note.SMIME ' failed at below line
| Dim oMsg As Outlook.MailIte m = oMsgs.GetFirst ' only for 'IPM.Note'
message
|
| Dim oMsg As Object = oMsgs.GetFirst ' only for 'IPM.Note.SMIME ' message
|
| Debug.WriteLine (oMsg.Subject)
| Debug.WriteLine (oMsg.MessageCl ass)
| Debug.WriteLine (oMsg.Class)
| ' if message class is 'IPM.Note.SMIME ' failed at below line
| Debug.WriteLine (CStr(oMsg.Rece ivedTime))
| Debug.WriteLine ("-----------------------")
| Catch ex As Exception
| Debug.WriteLine (ex.Message.ToS tring)
| End Try
|
| oNS.Logoff()
|
|

Nov 21 '05 #4

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

Similar topics

4
10076
by: Andy Bates | last post by:
Hi - I am developing an application that needs to automate Microsoft Outlook and I need to capture the ItemSend event. The PC I'm developing with has Outlook 2003 on; the problem I have is I need to make the code work with Outlook XP (i.e. 2002)! The code to add the event is currently: oOutlook.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler
6
4541
by: Ernie | last post by:
We have an Outlook 2000 VBA application - 8 user forms, and about a thousand lines of code - that we wish to distribute. We know that we can password-protect the code, but that does not give us the desired level of security We plan to use VB.NET to create an executable file which we will distribute to our users. We have tested this, and it works. However, I've seen some references on various newsgroups indicating that this will not work,...
9
3076
by: George McCullen | last post by:
I have an Outlook 2003 using Exchange Server 2003 Public Contacts Folder containing 20,000 Contacts. I am writing a VB .Net 2003 program that loops through all the contacts in a "for each oCt in oItems" loop. After about 250 contacts, the program gives an InvalidCastException Error on the for each loop. I notice that Outlook's memory keeps increasing (using the task manager) until it reaches around 20,000K. When I run the program a second...
1
1293
by: Li Pang | last post by:
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.
11
4472
by: Maximus | last post by:
Hi all, Has anyone been able to reterive the gradient selection colors used in outlook 2003? Basically, I have a grid showing a list of records and my client wants the selected row to have the same selection gradient back color as Outlook 2003 has on its left pane. The selected pane in Outlook 2003 have a gradient orange color for blue color scheme in XP. This gradient color changes according to the color schemes of the windows XP. Can...
6
6123
by: bluejay | last post by:
Being relatively new to computers, I decided to configure my Hotmail and Yahoo mail with Outlook. Following the instructions, I did what was directed. My Yahoo is perfect - I click on the Yahoo in the folders in Outlook and up comes my mailbox. However, when I click the Hotmail one, I get a window that states that"An error has occurred in the Script, Line-3; Char-1; Error-Syntax Error; Code-0; Url (3 lines long!)" Underneath is a box asking if I...
4
28445
by: Andy | last post by:
Hi, I have a C# application and I'd like it to use Outlook 2003 to send messages. I don't want to send them programmaticlly though; I just want to open the New Messge window, set the recipients and leave it there for the user to finish filling out. What classes am I looking for?
3
2952
by: Chet | last post by:
I am writing an application that utilizes a reference to Microsoft Outlook. (Added a reference to the MS Outlook COM interface to my project). I then write code such as: dim olApp as new Outlook.Applicaiton dim olNamespace as OutlOok.Namespace = olApp..... I am deploying my application via the "publish" feature that makes it downloadable and installable via the web.
1
7560
by: Sylfelin | last post by:
Hello, If I use Microsoft Outlook 12.0 Object Library (Outlook 2007) COM Object in my application, the custommer must have the outlook 2007 on his computer ? But if i use Microsoft Outlook 11.0 Object Library (Outlook 2003) COM Object in my application, the custommer must have the outlook 2003 or outlook 2007 on his computer ?
0
8265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8705
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5574
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4197
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2625
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.