Creating Custom View

  • Thread starter Thread starter KP
  • Start date Start date
K

KP

Hi,

Am using the particular piece of code

Dim olApp As Outlook.Application
Dim objName As NameSpace
Dim objViews As Views
Dim objView As View

Set olApp = Outlook.Application
Set objName = olApp.GetNamespace("MAPI")
Set objViews = objName.GetDefaultFolder(olFolderInbox).Views
'Return a view called Table View
Set objView = objViews.Item("Table View")

but when i comiple " user defined type not declared" --> "objViews As Views"

what reference should i add?
Am using VB6.0 and Outlook 2000
 
Outlook 2000 does not support the Views collection or View object. Those were added in Outlook 2002.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Got it ..
thanks
Ken Slovak - said:
Outlook.View and .Views were added in Outlook 2002. Your error is
because those objects don't exist for Outlook 2000.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


KP said:
Hi,

Am using the particular piece of code

Dim olApp As Outlook.Application
Dim objName As NameSpace
Dim objViews As Views
Dim objView As View

Set olApp = Outlook.Application
Set objName = olApp.GetNamespace("MAPI")
Set objViews = objName.GetDefaultFolder(olFolderInbox).Views
'Return a view called Table View
Set objView = objViews.Item("Table View")

but when i comiple " user defined type not declared" --> "objViews As Views"

what reference should i add?
Am using VB6.0 and Outlook 2000
 
Back
Top