A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Custom Button to display on in Contacts view?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 24th 06, 11:50 PM posted to microsoft.public.outlook.program_forms
Rich Roller
external usenet poster
 
Posts: 8
Default Custom Button to display on in Contacts view?

I was told by a MS employee in a private newsgroup to ask my question in
this public group...

Is there an easy way to have a custom button display just for certain item
types/forms, e.g. Contacts, ideally without complicated VB programming.

More specifically, I created a custom button (method: Customize Toolbar,
drag button to tool bar) that is relavent only to Contacts. The problem is
that this button now shows up for other item types like Message,
Appointment, etc which is confusing to users and undesirable.

I got a tip from an Ken Slovak in public VBA newsgroup which gave me some
clues on how to approach this via VB (see below) but I just wanted to check
here to make sure there isn't another way to do this with less or no
programming.

I'd also like to avoid having to make a custom form and distribute/install
it for each appropriate user. I realize that's what you all do "for a
living" but it's not my preferred choice.

In my dreams, I would just edit properties of the custom button I just
created and click to display on Contacts only... I don't see such a
mechanism but anything similar would be awesome!

Thanks.

-Rich

"Ken Slovak - [MVP - Outlook]" wrote in message
...

If you handle the NewInspector event of the Inspectors collection and you


are only interested in creating your button for contacts the first step is


to check for contacts when that event fires. That's the code that uses


Inspector.CurrentItem.Class = olContact. If it's anything but a contact
you


don't instantiate the Inspector wrapper.




Code for creating buttons in Inspectors using a wrapper and collection and


creating the actual buttons in the class is available for both VB 6 and
C#.


The C# example is at http://www.outlookcode.com/codedetail.aspx?id=797 and


the VB 6 code is at


http://www.slovaktech.com/code_sampl...spectorWrapper. That should
get


you started.




--


Ken Slovak


[MVP - Outlook]


http://www.slovaktech.com


Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003



Ads
  #2  
Old February 24th 06, 11:55 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Custom Button to display on in Contacts view?

A toolbar button? No, it takes code to detect what kind of folder the user is looking at and display/hide the button appropriately. Ken gave you the right answer.

A button on a custom form? Yes, but you said you didn't want a custom form.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Rich Roller" wrote in message ...
I was told by a MS employee in a private newsgroup to ask my question in
this public group...

Is there an easy way to have a custom button display just for certain item
types/forms, e.g. Contacts, ideally without complicated VB programming.

More specifically, I created a custom button (method: Customize Toolbar,
drag button to tool bar) that is relavent only to Contacts. The problem is
that this button now shows up for other item types like Message,
Appointment, etc which is confusing to users and undesirable.

I got a tip from an Ken Slovak in public VBA newsgroup which gave me some
clues on how to approach this via VB (see below) but I just wanted to check
here to make sure there isn't another way to do this with less or no
programming.

I'd also like to avoid having to make a custom form and distribute/install
it for each appropriate user. I realize that's what you all do "for a
living" but it's not my preferred choice.

In my dreams, I would just edit properties of the custom button I just
created and click to display on Contacts only... I don't see such a
mechanism but anything similar would be awesome!

Thanks.

-Rich

"Ken Slovak - [MVP - Outlook]" wrote in message
...

If you handle the NewInspector event of the Inspectors collection and you


are only interested in creating your button for contacts the first step is


to check for contacts when that event fires. That's the code that uses


Inspector.CurrentItem.Class = olContact. If it's anything but a contact
you


don't instantiate the Inspector wrapper.




Code for creating buttons in Inspectors using a wrapper and collection and


creating the actual buttons in the class is available for both VB 6 and
C#.


The C# example is at http://www.outlookcode.com/codedetail.aspx?id=797 and


the VB 6 code is at


http://www.slovaktech.com/code_sampl...spectorWrapper. That should
get


you started.




--


Ken Slovak


[MVP - Outlook]


http://www.slovaktech.com


Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003



  #3  
Old February 25th 06, 04:55 AM posted to microsoft.public.outlook.program_forms
Rich Roller
external usenet poster
 
Posts: 8
Default Custom Button to display on in Contacts view?

Sue,

Thanks for confirming that the only way to do this is with code.

I'm not sure I understand what question your 2nd reply is to.

-Rich

"Sue Mosher [MVP-Outlook]" wrote in message
...
A toolbar button? No, it takes code to detect what kind of folder the user
is looking at and display/hide the button appropriately. Ken gave you the
right answer.

A button on a custom form? Yes, but you said you didn't want a custom form.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Rich Roller" wrote in message
...
I was told by a MS employee in a private newsgroup to ask my question in
this public group...

Is there an easy way to have a custom button display just for certain item
types/forms, e.g. Contacts, ideally without complicated VB programming.

More specifically, I created a custom button (method: Customize Toolbar,
drag button to tool bar) that is relavent only to Contacts. The problem
is
that this button now shows up for other item types like Message,
Appointment, etc which is confusing to users and undesirable.

I got a tip from an Ken Slovak in public VBA newsgroup which gave me some
clues on how to approach this via VB (see below) but I just wanted to
check
here to make sure there isn't another way to do this with less or no
programming.

I'd also like to avoid having to make a custom form and distribute/install
it for each appropriate user. I realize that's what you all do "for a
living" but it's not my preferred choice.

In my dreams, I would just edit properties of the custom button I just
created and click to display on Contacts only... I don't see such a
mechanism but anything similar would be awesome!

Thanks.

-Rich

"Ken Slovak - [MVP - Outlook]" wrote in message
...

If you handle the NewInspector event of the Inspectors collection and you


are only interested in creating your button for contacts the first step
is


to check for contacts when that event fires. That's the code that uses


Inspector.CurrentItem.Class = olContact. If it's anything but a contact
you


don't instantiate the Inspector wrapper.




Code for creating buttons in Inspectors using a wrapper and collection
and


creating the actual buttons in the class is available for both VB 6 and
C#.


The C# example is at http://www.outlookcode.com/codedetail.aspx?id=797
and


the VB 6 code is at


http://www.slovaktech.com/code_sampl...spectorWrapper. That should
get


you started.




--


Ken Slovak


[MVP - Outlook]


http://www.slovaktech.com


Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003





  #4  
Old February 25th 06, 03:11 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Custom Button to display on in Contacts view?

A "custom button" could mean either a toolbar button or a button on a custom form.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Rich Roller" wrote in message ...
Sue,

Thanks for confirming that the only way to do this is with code.

I'm not sure I understand what question your 2nd reply is to.

-Rich

"Sue Mosher [MVP-Outlook]" wrote in message
...
A toolbar button? No, it takes code to detect what kind of folder the user
is looking at and display/hide the button appropriately. Ken gave you the
right answer.

A button on a custom form? Yes, but you said you didn't want a custom form.


"Rich Roller" wrote in message
...
I was told by a MS employee in a private newsgroup to ask my question in
this public group...

Is there an easy way to have a custom button display just for certain item
types/forms, e.g. Contacts, ideally without complicated VB programming.

More specifically, I created a custom button (method: Customize Toolbar,
drag button to tool bar) that is relavent only to Contacts. The problem
is
that this button now shows up for other item types like Message,
Appointment, etc which is confusing to users and undesirable.

I got a tip from an Ken Slovak in public VBA newsgroup which gave me some
clues on how to approach this via VB (see below) but I just wanted to
check
here to make sure there isn't another way to do this with less or no
programming.

I'd also like to avoid having to make a custom form and distribute/install
it for each appropriate user. I realize that's what you all do "for a
living" but it's not my preferred choice.

In my dreams, I would just edit properties of the custom button I just
created and click to display on Contacts only... I don't see such a
mechanism but anything similar would be awesome!

Thanks.

-Rich

"Ken Slovak - [MVP - Outlook]" wrote in message
...

If you handle the NewInspector event of the Inspectors collection and you


are only interested in creating your button for contacts the first step
is


to check for contacts when that event fires. That's the code that uses


Inspector.CurrentItem.Class = olContact. If it's anything but a contact
you


don't instantiate the Inspector wrapper.




Code for creating buttons in Inspectors using a wrapper and collection
and


creating the actual buttons in the class is available for both VB 6 and
C#.


The C# example is at http://www.outlookcode.com/codedetail.aspx?id=797
and


the VB 6 code is at


http://www.slovaktech.com/code_sampl...spectorWrapper. That should
get


you started.



  #5  
Old February 25th 06, 10:06 PM posted to microsoft.public.outlook.program_forms
Rich Roller
external usenet poster
 
Posts: 8
Default Custom Button to display on in Contacts view?

Ah, I see now what you meant. I've been focusing on a custom toolbar
button.

If I want to improve on this method, I guess I'll give a shot to figuring
out Ken Slovak's suggestion.

There isn't any pre-made code you know of for displaying buttons only if
view/form=xxxx? (e.g. Contacts)

-Rich


"Sue Mosher [MVP-Outlook]" wrote in message
...
A "custom button" could mean either a toolbar button or a button on a custom
form.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Rich Roller" wrote in message
...
Sue,

Thanks for confirming that the only way to do this is with code.

I'm not sure I understand what question your 2nd reply is to.

-Rich

"Sue Mosher [MVP-Outlook]" wrote in message
...
A toolbar button? No, it takes code to detect what kind of folder the user
is looking at and display/hide the button appropriately. Ken gave you the
right answer.

A button on a custom form? Yes, but you said you didn't want a custom
form.


"Rich Roller" wrote in message
...
I was told by a MS employee in a private newsgroup to ask my question in
this public group...

Is there an easy way to have a custom button display just for certain
item
types/forms, e.g. Contacts, ideally without complicated VB programming.

More specifically, I created a custom button (method: Customize Toolbar,
drag button to tool bar) that is relavent only to Contacts. The problem
is
that this button now shows up for other item types like Message,
Appointment, etc which is confusing to users and undesirable.

I got a tip from an Ken Slovak in public VBA newsgroup which gave me some
clues on how to approach this via VB (see below) but I just wanted to
check
here to make sure there isn't another way to do this with less or no
programming.

I'd also like to avoid having to make a custom form and
distribute/install
it for each appropriate user. I realize that's what you all do "for a
living" but it's not my preferred choice.

In my dreams, I would just edit properties of the custom button I just
created and click to display on Contacts only... I don't see such a
mechanism but anything similar would be awesome!

Thanks.

-Rich

"Ken Slovak - [MVP - Outlook]" wrote in message
...

If you handle the NewInspector event of the Inspectors collection and
you


are only interested in creating your button for contacts the first step
is


to check for contacts when that event fires. That's the code that uses


Inspector.CurrentItem.Class = olContact. If it's anything but a contact
you


don't instantiate the Inspector wrapper.




Code for creating buttons in Inspectors using a wrapper and collection
and


creating the actual buttons in the class is available for both VB 6 and
C#.


The C# example is at http://www.outlookcode.com/codedetail.aspx?id=797
and


the VB 6 code is at


http://www.slovaktech.com/code_sampl...spectorWrapper. That should
get


you started.




  #6  
Old February 25th 06, 10:40 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Custom Button to display on in Contacts view?

I thought Ken already explained how to do that with an Inspector wrapper class. The technique for an Explorer wrapper class would be similar, except that you'd use the FolderSwitch event and the DefaultItemType property instead of NewInspector and Class.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Rich Roller" wrote in message ...
Ah, I see now what you meant. I've been focusing on a custom toolbar
button.

If I want to improve on this method, I guess I'll give a shot to figuring
out Ken Slovak's suggestion.

There isn't any pre-made code you know of for displaying buttons only if
view/form=xxxx? (e.g. Contacts)

-Rich


"Sue Mosher [MVP-Outlook]" wrote in message
...
A "custom button" could mean either a toolbar button or a button on a custom
form.

"Rich Roller" wrote in message
...
Sue,

Thanks for confirming that the only way to do this is with code.

I'm not sure I understand what question your 2nd reply is to.

-Rich

"Sue Mosher [MVP-Outlook]" wrote in message
...
A toolbar button? No, it takes code to detect what kind of folder the user
is looking at and display/hide the button appropriately. Ken gave you the
right answer.

A button on a custom form? Yes, but you said you didn't want a custom
form.


"Rich Roller" wrote in message
...
I was told by a MS employee in a private newsgroup to ask my question in
this public group...

Is there an easy way to have a custom button display just for certain
item
types/forms, e.g. Contacts, ideally without complicated VB programming.

More specifically, I created a custom button (method: Customize Toolbar,
drag button to tool bar) that is relavent only to Contacts. The problem
is
that this button now shows up for other item types like Message,
Appointment, etc which is confusing to users and undesirable.

I got a tip from an Ken Slovak in public VBA newsgroup which gave me some
clues on how to approach this via VB (see below) but I just wanted to
check
here to make sure there isn't another way to do this with less or no
programming.

I'd also like to avoid having to make a custom form and
distribute/install
it for each appropriate user. I realize that's what you all do "for a
living" but it's not my preferred choice.

In my dreams, I would just edit properties of the custom button I just
created and click to display on Contacts only... I don't see such a
mechanism but anything similar would be awesome!

Thanks.

-Rich

"Ken Slovak - [MVP - Outlook]" wrote in message
...

If you handle the NewInspector event of the Inspectors collection and
you

are only interested in creating your button for contacts the first step
is

to check for contacts when that event fires. That's the code that uses

Inspector.CurrentItem.Class = olContact. If it's anything but a contact
you

don't instantiate the Inspector wrapper.



Code for creating buttons in Inspectors using a wrapper and collection
and

creating the actual buttons in the class is available for both VB 6 and
C#.

The C# example is at http://www.outlookcode.com/codedetail.aspx?id=797
and

the VB 6 code is at

http://www.slovaktech.com/code_sampl...spectorWrapper. That should
get

you started.



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Toolbar button to evoke a custom view ? [email protected] Outlook - General Queries 1 March 20th 06 02:30 PM
How do I display the picture in a view of my contact? John alias Louis Outlook - Using Contacts 1 February 10th 06 02:08 PM
Creating Custom Forms...Display, Headers & Printing macus Outlook - Using Forms 1 January 25th 06 03:01 PM
Restore custom view settings Sue Mosher [MVP-Outlook] Outlook - Installation 0 January 18th 06 07:57 PM
Custom View Filters - Advanced deandepetra Outlook - Using Contacts 1 January 18th 06 11:15 AM


All times are GMT +1. The time now is 10:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.