Can any body let me know how to programatically delete or
hide that form using vb code
If possible please send me the code snippet
Thanks in advance
Regards
Vadiraj
This requires coding in CDO 1.21 (optional installation for Outlook 2000 and
later) or Extended MAPI (C++ or Delphi only) to get at the Common Views
folder.
CDO code would look something like this when run from within Outlook (so an
Outlook session is already established). This code requires a project
reference to be set to CDO.DLL which is CDO 1.21:
Dim oSession As MAPI.Session
Dim oInbox As MAPI.Folder
Dim oRoot As MAPI.Folder
Dim oStore As MAPI.InfoStore
Dim oViews As MAPI.Folder
Dim oMessage As MAPI.Message
Dim oFolders As MAPI.Folders
Dim oMessages As MAPI.Messages
Dim sMessageClass As String
Set oSession = CreateObject("MAPI.Session")
oSession.Logon "", "", False, False
Set oInbox = oSession.Inbox
Set oStore = oSession.GetInfoStore(oInbox.StoreID)
Set oRoot = oStore.RootFolder
Set oFolders = oRoot.Folders
'for Outlook 2003 use "IPM_Common_Views" instead
Set oView = oFolders.Item("Common Views")
Set oMessages = oView.HiddenMessages
For Each oMessage In oMessages
If oMessage.Type = "IPM.Microsoft.FolderDesign.FormsDescription" Then
sMessageClass = oMessage.Fields(&H6800001E)
If sMessageClass = "IPM.Note.xxx" Then
oMessage.Delete
Exit For
End If
Next
oSession.Logoff
'now set all objects = Nothing
--
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
"Vadiraj" <vadira...@paconsulting.com> wrote in message
news:1d94201c45432$8a989550$a501...@phx.gbl...
Thanks and Regards
Vadiraj
>.
>
--
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
"Vadiraj" <vadira...@paconsulting.com> wrote in message
news:1ee7101c45777$aea41490$a301...@phx.gbl...
Can you think of any other way to return system folders from the root?
--
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
"Sue Mosher [MVP-Outlook]" <sue...@outlookcode.com> wrote in message
news:32F21D3D-D569-4397...@microsoft.com...
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Ken Slovak - [MVP - Outlook]" <kens...@mvps.org> wrote in message
news:eJl6i2Zm...@TK2MSFTNGP14.phx.gbl...
> Hmm, how about using PR_COMMON_VIEWS_ENTRYID (0x35E60102) from IMsgStore
> (InfoStore)? That should work and be language independent.
>
The property is there in OutlookSpy in Outlook 2000 and 2002 here. I'm not
running any earlier versions but it should be there too.
--
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
"Sue Mosher [MVP-Outlook]" <sue...@outlookcode.com> wrote in message
news:%23qSSqDa...@TK2MSFTNGP11.phx.gbl...