Some tips to keep in mind when programming in Outlook:
Return to List
a) Every item in Outlook uses a particular form to display its data. [You cannot
build a form from scratch - you must always start with one of the built-in
forms or an existing Outlook item.] However, this is not a major handicap,
since you can hide the default pages and display only custom pages that
you yourself create.
b) A good programming technique is to create the form and underlying code using
VBA (along with the VBE) - then convert the code to VBScript.
c) Whether you use VBA or VBScript somewhat depends on the task you're trying to perform:
1) Make something happen in response to something the user does with an Outlook
item (modify an Outlook form with VBScript)
2) Write a macro that can be run from the Outlook toolbar (write a routine in VBA)
3) Make something happen when the user starts Outlook, switches to a different
folder, or performs other actions that don't involve a particular Outlook
item (write a routine in VBA)
4) Display status information as the User performs various Outlook tasks (create
a form in VBA with a routine to show the status information)
5) Show additional information on an Outlook form (modify the Outlook form)
NOTE!! -- You cannot use VBA to put programming behind an Outlook form and distribute
it to others! The programming language behind Outlook messages and other
forms is VBScript; however, you can use Outlook's VBA environment to write
and test the code you want to use in scripts, then convert the VBA to VBScript.
d) Outlook pages with captions shown in parentheses are hidden.
e) You can save a form in 3 ways:
1) As an item in an Outlook folder [not the recommended method - to easy to
delete and misplace]
2) An an Outlook template file anywhere on your computer
3) Choose File | Save As | Save As Type (choose Outlook template (*.oft)) then
provide a filename and location.
f) As a published Outlook form, either in a forms library or in a particular folder
g) There are 3 types of forms libraries available -
1) Personal forms - A library of forms stored in your Personal folders or Exchange
Server mailbox.
2) Organization forms - A library of forms stored on the Exchange Server for
group use. You need permission from the Exchange Server Administrator to
publish to this library.
3) Folder forms - A library of forms associated with a particular folder, either
in your mailbox or Personal Folders or in a public folder on the
Exchange Server. You must have folder owner permission to publish to a
public folder.
NOTE!! -- Publishing a form is the only way that a form with code behind it will appear
without the Enable Macros message popping up every time.
h) Remember that forms have properties - in addition to the more typical properties
associated with controls.