Appointment Label Setting and Voting Buttons

G

Guest

How do you set the label of an appointment item?

Does Anyone know about voting buttons? I would like to write a script that
updates the persons Calendar when they select a date choice using voting
buttons.
 
S

Sue Mosher [MVP-Outlook]

See http://www.outlookcode.com/codedetail.aspx?id=139 for sample code that shows how to use CDO 1.21 to set a calendar color label in Outlook 2002 or 2003.

Code behind voting buttons on a custom form would go in the Item_CustomAction event handler. You can look up the CustomAction event in Help to get details.
 
G

Guest

The problem with a custom form is the people do not know how to nuild one.
WHat I would like to do is place code behind the default voting buttons
provided by Outlook. When one button is selected the person's (who made the
selection) calendar would be updated with the appointment. The person
sending the email would have to be able to link the code to the voting
button, and then be able to update the code with the correct appointment
information.

I hat voting and then having to go into my calendar to update with the
information from the email.

Thanks for the color information. I will try it today.
 
S

Sue Mosher [MVP-Outlook]

I don't follow your. There are no "default voting buttons." Any message can have any combination of voting buttons.

Maybe voting buttons aren't the right solution for your scenario? If you want a message that involves selecting a choice of dates, you can do that in a regular custom message form with code behind it to create an appointment. The date choices could be in a list or combo box. The question then becomes, how does the user creating the item from the custom form input the date choices? You tell us how you envision this might work -- we don't know anything about your application.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

People are trying to track attendance. One example would be for training.
The send the blanket email, add voting buttons with the select training dates
and then the person responds by selecting the date that best fits their
schedule. The problem I have is I would like the voting button to update my
calendar after I select the date. The people that are sending the message do
not know VBA so, I thought I could help by writing a program that would add
the appointment to the calendar based on the voting button choices.

I have never used voting buttons so I am a little in the dark how to get a
program to recognize that they exist. This is a one shot deal and I do not
write much code anymore so books and such are not an option.
 
S

Sue Mosher [MVP-Outlook]

Iit is not possible to create a custom message form to which the user would add an unspecified number of voting buttons at run time -- in other words one generic form that all users could use -- and have that form run code to respond to the voting button clicks.

There are potentially other ways to accomplish what you want to do, but none of them are very simple. The one that might be most appealing -- assuming that you're in an Exchange environment and can publish to the Organizational Forms library -- would be to adapt the techniques used in the holiday distribution form listed at http://www.outlookcode.com/d/forms/holiday.htm . The read page of the form, for example, might display the list of dates set out in the body of the compose page of the form.

An alternative, if you are determined to use voting buttons, would be to hook into the CustomAction event using the technique shown at http://www.outlookcode.com/codedetail.aspx?id=526. To make this work for everyone, though, would require building and distributing a COM add-in.

The C++ sample add-in at http://www.codeproject.com/atl/outlook2k3addin.asp also shows a technique for working with the context menu.


However, I have to be frank with you: If you don't write much code and you're not interested in learning at least a few Outlook ins and outs, this project may be more than you want to tackle.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

It is not that I have not written a lot of code it is I do not write a lot of
code anymore. I have experience with C, Pascal, VB, Java, PLSQL, PL, and
OWAS. The difficulty I have with Outlook is the inability to record a macro
and let the application create the objects. I do not know the objects (by
name) so it becomes more difficult to manipulate something I can not find.
BTW the color thing worked like a charm!

The number of buttons on the form would be known at the time the email is
written. The buttons would always have the same "name(s)" so the code would
work. The idea is to only change the start date and times as well as the
objects subject within the program. Your insight is very helpful.
 
S

Sue Mosher [MVP-Outlook]

That's my point. Unless you're willing to learn the objects -- through the resources at microsoft.com, at my site (see signature), in this forum, in other sites across the Internet -- you won't be able to do this project.

How could the buttons have the same names every time if you are having people create messages to pick different dates? What the user picks *is* the name of the custom action (voting button).

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

The light bulb just went on. Now I understand the voting button problem. Is
there another way to reference the votinig button object. One example like
an object collection. Button(1), Button(2) This would provide the standard
"naming convention".

RV
 
S

Sue Mosher [MVP-Outlook]

Yes and no. The MailItem.Actions collection contains the buttons (or pointers to them), but you cannot write code behind a form that will have a variable number of buttons -- different for each message. The form will one-off (see http://www.outlookcode.com/d/formpub.htm#macro).

The possibilities remaining are the ones I indicated earlier -- some other design for the form or a COM add-in to hook into the CustomAction event.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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