manipulate OVC items

E

E. Lafontaine

Hi, I have a Outlook View Control in an Outlook Form.



I would like the user to be able to select several items and then, with a
command button click, re-affect information to all of the selected items
(similar to an ActiveExplorer.Selection).



I see in the OVC that you can open, delete, affect categories, etc, but
doesn't seem to be possible to manipulate the items selected.



Any suggestion ?



(if it doesn't work, I understand I will have to populate a list of the
items in the form).
 
S

Sue Mosher

The OVC in Outlook 2002 and later has a Selection
property. There's a clumsy workaround using the Open
method. See
http://www.slipstick.com/dev/formcontrols.htm#ovc

-----Original Message-----
Hi, I have a Outlook View Control in an Outlook Form.



I would like the user to be able to select several items and then, with a
command button click, re-affect information to all of the selected items
(similar to an ActiveExplorer.Selection).



I see in the OVC that you can open, delete, affect categories, etc, but
doesn't seem to be possible to manipulate the items
selected.
 
A

Anita Gupta

Sue,

I've been to the Slipstick site many times and I've reviewed all of the
material there regarding team folders and the Outlook view control. I'm
having trouble finding samples regarding the Outlook View Control.

I need to capture the SelectionChange() event as mentioned in the
documentation that came with the Outlook View Control. However there are no
samples and I can't seem to set up my form to capture events. I've tried
everything I can think of and no events are firing. I'm using the View
Control on a Contact Form. I can implement it and set the properties just
fine. Its just that events aren't firing. Do you have an example of how to
set a ContactItem object equal to the currently selected item in the Outlook
View Control? (I can't even get the "Selection" property to give this to
me). What would be best is to set the object equal to the currently selected
on the SelectionChange event if you can give me an example.... please???

Anita
 
S

Sue Mosher [MVP]

The OVC does not fire any events in an Outlook form.
--
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
 
A

Anita Gupta

Thanks Sue,

I guess it only works in XP.

Anita
The OVC does not fire any events in an Outlook form.
--
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
 
S

Sue Mosher [MVP]

No, you can't get the OVC in an Outlook form to fire a SelectionChange event in *any* version of Outlook. Form events are limited for all controls.
 
A

Anita Gupta

Sue,

I actually did have it working on my XP machine using a UserForm in the VBA
module and calling it from my custom contact form. The SelectionChange event
worked perfectly. It just wouldn't work in my 2K machine that's what
prompted this posting.

Thanks,

Anita
No, you can't get the OVC in an Outlook form to fire a SelectionChange event
in *any* version of Outlook. Form events are limited for all controls.
 
S

Sue Mosher [MVP]

Your original post discussed using the OVC on an Outlook contact form, not on a VBA userform.

Since Outlook 2000's OVC does not support a Selection property, it stands to reason that it also does not support a SelectionChange event.
 
A

Anita Gupta

Yes, I found that out after much experimentation. The documentation that
comes with the View Control when downloaded from Microsoft says that it does
support the Selection property and the Selection Change event. However, it
does not. After much frustration, I tried playing with it in XP (after my
original post) and got it to work with a UserForm. Supposedly, the
SelectionChange event doesn't work because of a built in limitation of
Outlook Forms. However, double-clicking an item in the view control opens it
(obviously, extended functionality from the basic click event of standard
controls) so I'd think that if Microsoft wanted to have the SelectionChange
event fire in an Outlook form, they could.

At the very least, I'd think that they should not list properties and events
in the documentation that isn't there. With XP, I don't need to download the
OVC, it comes with it. So in the downloaded version, you'd think that they'd
know that people are using it with O2K.

Thank you very much for your help, Sue.

BTW, is there any way to loop through a Journal folder and get the OLE
attachments (mail items) and move the mail items to another folder (not the
Journal item itself)? I've posted this a couple times with no help.

Thanks,

Anita

Your original post discussed using the OVC on an Outlook contact form, not
on a VBA userform.

Since Outlook 2000's OVC does not support a Selection property, it stands to
reason that it also does not support a SelectionChange event.
 

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