CurrentView

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

Hi,

When i am trying to set the a specific view using the
CurrentView property on a MAPI folder, the app is throwing
up a error.

Does it have to be set as a ActiveExplorer for this to
work?

Appreciate your help.

Matt
 
There is no CurrentView property for a MAPIFolder. That property is for an
Explorer. Have you tried using MAPIFolder.GetExplorer? You would have to
show some of your code and say what error you are getting for a better
answer.
 
Dim olNFldr as mapifolder

'Copy a predefined folder to the required location and set
olNFldr to the copied folder. The olNFldr now has all the
views from the predefined folder.

olNFldr.CurrentView = olNFldr.Views(4).Name

This throws up a error something like "Invalid procedure
call or argument".

But when i set the active explorer to the olNFldr. It
works fine.

So was wondering if the view can set only on the
activeexplorer folder.

MSDN:CurrentView Property

Returns or sets an Object (for the MAPIFolder object) or
Variant (for the Explorer object) representing the current
view. Read/write.
 
Sorry, I should have said that only Explorers have a CurrentView property
that is read/write. If you look in the Object Browser you will see that
MAPIFolder.CurrentView is read-only.

It wouldn't matter what Explorer but if you want to use CurrentView you have
to get an Explorer object. The code I showed you using
MAPIFolder.GetExplorer.CurrentView does that.
 
Back
Top