Outlook 2003 - Custom Templates for Public Folders

G

Guest

Hi,

Recently, I have discovered and made use of the ability to create
custom templates for entries into public folders. At our
organization, we use them solely as calendars to illustrate to staff
that, for example, John has a meeting at 10:00a, Sally is out of the
office, etc. However, I would like to have the data entered into my
custom forms displayed on the calendar. For example, by default, when
data is entered into the "Subject" of the public folder, the
information is displayed on the calendar for viewing. However, none
of my custom fields will show this data as the "Subject" field does.
Is there any way to do this with custom templates?


Thank you.
 
S

Sue Mosher [MVP-Outlook]

You could use code behind the form to append the data from your custom fields to the Subject or Location property. Those are the only text properties that show data in day/week/month views.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thank you for your help. I understand what you mean, but am unsure of the
method of doing so. Can you please explain?

Thanks,
Scott
 
S

Sue Mosher [MVP-Outlook]

At its simplest, it would be something like this:

Function Item_Write()
Item.Subject = Item.Subject & " - " & Item.UserProperties("Your_Property")
End Function

although realistically, you'd probably want to do a little more text parsing to handle the case where an item is being saved multiple times.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

I hope I don't sound too oblivious, but where do I place the code or access
the location to do so?

Thanks again.
 
S

Sue Mosher [MVP-Outlook]

Click the View Code button on the toolbar.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thanks. I got there, but I must not be doing something correctly.
Initially, I was thinking that I could create multiple "Subject" fields to
display the data and rename them appropriately, but it seems that they're
tied together. For example, if I enter test into one of the "Subject"
fields, all of them display "Test." Any other ideas to have multiple fields
display on the public folder?

Thank you.
 
G

Guest

Hi, Sue,

So I've done a bit of research to better understand what you're talking
about below, but am still slightly confused. As an example, I have 3 text
boxes that I want displayed on the calendar. Each of the fields I've created
in my form are text boxes and they're named textbox1, textbox2, and textbox3.
How would I go about implementing your code below to satisfy my needs?

Thanks again.

-Scott
 
S

Sue Mosher [MVP-Outlook]

The first step is to specify whether these are unbound text boxes or whether they are bound to Outlook custom properties. That will determine the syntax you need to use, as discussed at http://www.outlookcode.com/article.aspx?ID=38

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

I would assume that these are unbound text boxes, as they are not dependent
upon any Outlook properties. Although would their origin as "Subject" fields
make them bound text boxes?

Based upon your determination of whether they are bound or unbound, should
my code look like this for 3 text boxes?

Function Item_Write()
Item.Subject = Item.Subject & " - " & Item.UserProperties("textbox1")
Item.Subject = Item.Subject & " - " & Item.UserProperties("textbox2")
Item.Subject = Item.Subject & " - " & Item.UserProperties("textbox3")
End Function

Thanks so much for your help, once again!
 
S

Sue Mosher [MVP-Outlook]

There would be no point in having three text boxes all bound to the Subject field. You would either use unbound text boxes or boxes bound to three separate custom fields.

Your code below would be appropriate only if textbox1 etc. were custom properties. As you probably have the form designed now, it would need to be adjust to use the correct syntax for unbound controls, as shown at http://www.outlookcode.com/article.aspx?ID=38

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Sue,

Per your input, I've recreated my textboxes so that they are now unbound.
My rationale behind binding them to the "Subject" field was to emulate the
"Subject" field's ability to display on the calendar. However, now that they
are unbound, can you please help me with the code to make two textboxes named
"textbox1" and textbox2" display on the calendar, as the "Subject" field
would?

Thank you.
 
S

Sue Mosher [MVP-Outlook]

You already know how to set the value of the Subject property to an expression and how to concatenate multiple strings, because you showed those techniques in your earlier code snippet. All you need is the syntax for an unbound control's value, which is covered in the article I suggested. It requires information we don't have -- the name of the page they appear on.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Hi, Sue,

Last night, I visited outlookcode.com and spent a few hours trying to solve
my problem, but am still quite confused. Thus far, I've recreated my form
with unbound textboxes and have had no success with my code. As a refresher,
I want to emulate the "Subject" functionality on a public folder (calendar)
so that entries made into the textboxes will display on the calendar as the
"Subject" would. For example, if I wrote test1, test2, and test3 into the
corresponding textboxes, I'd like those three entries to show on the
calendar. If there is another method to do this, I would be open to it. I
just want my textboxes to display on the calendar.

I really appreciate your help in this matter.

Thank you.
 
S

Sue Mosher [MVP-Outlook]

What are you confused about? We can give you more instructions, but if they hit the same roadblocks of confusion, that effort is going to be a waste of everyone's time.

At this point, what might be the simplest solution is to use textboxes bound to custom Outlook properties and then set the value of the Subject property using a formula. To do that, you'd need to add Subject to a custom form page, so you can get to its control Properties, but that can be on a hidden page.
I want to emulate the "Subject" functionality on a public folder (calendar)
so that entries made into the textboxes will display on the calendar as the
"Subject" would.

Note that this is not an issue of displaying data "as the Subject would" but of putting the data you want to display actually in the Subject property.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thank you for your response, patience, and guidance.

I've tried using textboxes bound to the "Subject" property, but the problem
I keep experiencing is the following. Since all of my textboxes are bound to
the "Subject" property, if I type "Test" into one of the textboxes , they
will all become filled with "Test." Is there a way to maintain the "Subject"
field's properties, but differentiate them so that they do not copy each
other's contents?

Thanks again.
 
S

Sue Mosher [MVP-Outlook]

You need to bind each text box to a separate property, creating new ones as needed. Once you've done that, you can set a formula on the Subject property's text box to concatenate those new properties' values to build the Subject.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Any suggestions on where to find examples for the formula to concatenate my
other textboxes' properties to the Subject property's textbox?

Thank you.
 
S

Sue Mosher [MVP-Outlook]

If you use the formula editor to pick the fields, you'll see the field syntax that formulas take. After that, it's simple string operators.

[YourField] & " " & [YourOtherField]

etc.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

So you mean something like the following? Would that link the three
textboxes together?

[textbox1]& " " &[textbox2]& " " &[textbox3]

If that's correct and they're linked, how do I tie them to the "Subject"
property?

Thanks.






Sue Mosher said:
If you use the formula editor to pick the fields, you'll see the field syntax that formulas take. After that, it's simple string operators.

[YourField] & " " & [YourOtherField]

etc.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


Scott07 said:
Any suggestions on where to find examples for the formula to concatenate my
other textboxes' properties to the Subject property's textbox?
 

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