Creating Custom View

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
 
S

Sue Mosher [MVP]

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
 
K

KP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top