By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,099 Members | 2,156 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,099 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.Application
Dim oNS As Outlook.NameSpace
Dim oStores As Outlook.Folders
Dim oStore As Outlook.MAPIFolder
Dim oFolders As Outlook.Folders
Dim oFolder As Outlook.MAPIFolder
Dim oMsgs As Outlook.Items

oOutlook = New Outlook.Application
oNS = oOutlook.Session
oNS.Logon(ShowDialog:=False, NewSession:=False)

oStores = oNS.Folders

oStore = oNS.Folders.GetFirst()
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.MailItem = 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.MessageClass)
Debug.WriteLine(oMsg.Class)
' if message class is 'IPM.Note.SMIME' failed at below line
Debug.WriteLine(CStr(oMsg.ReceivedTime))
Debug.WriteLine("-----------------------")
Catch ex As Exception
Debug.WriteLine(ex.Message.ToString)
End Try

oNS.Logoff()
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.public.outlook.* newsgroups?

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

Hope this helps
Jay

"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:0D**********************************@microsof t.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.Application
| Dim oNS As Outlook.NameSpace
| Dim oStores As Outlook.Folders
| Dim oStore As Outlook.MAPIFolder
| Dim oFolders As Outlook.Folders
| Dim oFolder As Outlook.MAPIFolder
| Dim oMsgs As Outlook.Items
|
| oOutlook = New Outlook.Application
| oNS = oOutlook.Session
| oNS.Logon(ShowDialog:=False, NewSession:=False)
|
| oStores = oNS.Folders
|
| oStore = oNS.Folders.GetFirst()
| 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.MailItem = 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.MessageClass)
| Debug.WriteLine(oMsg.Class)
| ' if message class is 'IPM.Note.SMIME' failed at below line
| Debug.WriteLine(CStr(oMsg.ReceivedTime))
| Debug.WriteLine("-----------------------")
| Catch ex As Exception
| Debug.WriteLine(ex.Message.ToString)
| End Try
|
| oNS.Logoff()
|
|
Nov 21 '05 #2

P: n/a
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.public.outlook.* newsgroups?

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

Hope this helps
Jay

"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:0D**********************************@microsof t.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.Application
| Dim oNS As Outlook.NameSpace
| Dim oStores As Outlook.Folders
| Dim oStore As Outlook.MAPIFolder
| Dim oFolders As Outlook.Folders
| Dim oFolder As Outlook.MAPIFolder
| Dim oMsgs As Outlook.Items
|
| oOutlook = New Outlook.Application
| oNS = oOutlook.Session
| oNS.Logon(ShowDialog:=False, NewSession:=False)
|
| oStores = oNS.Folders
|
| oStore = oNS.Folders.GetFirst()
| 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.MailItem = 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.MessageClass)
| Debug.WriteLine(oMsg.Class)
| ' if message class is 'IPM.Note.SMIME' failed at below line
| Debug.WriteLine(CStr(oMsg.ReceivedTime))
| Debug.WriteLine("-----------------------")
| Catch ex As Exception
| Debug.WriteLine(ex.Message.ToString)
| End Try
|
| oNS.Logoff()
|
|

Nov 21 '05 #3

P: n/a
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.public.outlook.* newsgroups?

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

Hope this helps
Jay

"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:0D**********************************@microsof t.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.Application
| Dim oNS As Outlook.NameSpace
| Dim oStores As Outlook.Folders
| Dim oStore As Outlook.MAPIFolder
| Dim oFolders As Outlook.Folders
| Dim oFolder As Outlook.MAPIFolder
| Dim oMsgs As Outlook.Items
|
| oOutlook = New Outlook.Application
| oNS = oOutlook.Session
| oNS.Logon(ShowDialog:=False, NewSession:=False)
|
| oStores = oNS.Folders
|
| oStore = oNS.Folders.GetFirst()
| 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.MailItem = 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.MessageClass)
| Debug.WriteLine(oMsg.Class)
| ' if message class is 'IPM.Note.SMIME' failed at below line
| Debug.WriteLine(CStr(oMsg.ReceivedTime))
| Debug.WriteLine("-----------------------")
| Catch ex As Exception
| Debug.WriteLine(ex.Message.ToString)
| End Try
|
| oNS.Logoff()
|
|

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.