Customize the Information Bar using Add-in?

J

Jenny Tam

Hi,

We want to create an Outlook COM Add-in using Visual C++ to work in
both Outlook 2000 and XP. This COM Add-in allows the user to export
any email message to our SQL Server database (either a selected
message from Explorer or a message in Active Inspector). The project
team really wants to know whether the followings are possible:

1. Modify the right-click context menu of a message item to add our
Export button among Reply, Reply All, Mark as Read, etc.
2. Add an icon column in Outlook Explorer (similar to Importance or
Flag Status) such that
(a) the user will see our custom icon for the exported messages
(b) the user can sort the messages by this icon column
3. When the user views the message, the information bar should display
something like 'You exported this message on 7/15/2003 4:30 PM'. This
is similar to that after you reply or forward a message.
4. Replace the default 'i' in a blue circle icon with our custom icon
in that the information bar.
5. Add "Click here to see more information" in the information bar
such that when the info bar is clicked, it brings up a message box to
display more details to the export action.

Developing custom forms may be an answer to our problem. However, can
we design custom forms (new fields, actions, etc.) programmatically in
the COM add-in? How do we distribute/publish our custom forms to the
users so that they can get our custom forms/fields/actions?

If we can actually create and use custom forms programmatically, are
there any known issues of using custom forms? We know that when
customizing Outlook forms, there are some areas where a customized
form may not behave like a standard Outlook form. In our situation,
what are the known areas that will not behave as usual if custom forms
are used?

Thank you very much for any hints or suggestions,
Jenny
 
K

Ken Slovak - [MVP - Outlook]

The answer to all your questions is no, it can't be done. The InfoBar
is not accessible to programmers nor are the context menus.

Designing a form in code (adding controls, etc.) is not a good idea.
It causes the form to one-off, which causes problems and makes it
larger and prevents any code in it from running.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
J

Jenny Tam

Thank you very much for your prompt reply. I figured that the answer
is NO from various posts in the newsgroup. I suggested to the project
team that we can use the 'Follow up Flag', write our own message and
complete it. Then we have our own message plus the timestamp.
However, they don't like it because the user can easily clear it or
once the user use the follow up flag again, our custom message is
gone. Therefore, the project team really wants me to 'prove' that
what they want cannot be done.

Do you know, by any chance, of any KB article about any of my
questions? Unfortunately, KB 294868 does not help me much. :(

Thanks
Jenny



Ken Slovak - said:
The answer to all your questions is no, it can't be done. The InfoBar
is not accessible to programmers nor are the context menus.

Designing a form in code (adding controls, etc.) is not a good idea.
It causes the form to one-off, which causes problems and makes it
larger and prevents any code in it from running.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Jenny Tam said:
Hi,

We want to create an Outlook COM Add-in using Visual C++ to work in
both Outlook 2000 and XP. This COM Add-in allows the user to export
any email message to our SQL Server database (either a selected
message from Explorer or a message in Active Inspector). The project
team really wants to know whether the followings are possible:

1. Modify the right-click context menu of a message item to add our
Export button among Reply, Reply All, Mark as Read, etc.
2. Add an icon column in Outlook Explorer (similar to Importance or
Flag Status) such that
(a) the user will see our custom icon for the exported messages
(b) the user can sort the messages by this icon column
3. When the user views the message, the information bar should display
something like 'You exported this message on 7/15/2003 4:30 PM'. This
is similar to that after you reply or forward a message.
4. Replace the default 'i' in a blue circle icon with our custom icon
in that the information bar.
5. Add "Click here to see more information" in the information bar
such that when the info bar is clicked, it brings up a message box to
display more details to the export action.

Developing custom forms may be an answer to our problem. However, can
we design custom forms (new fields, actions, etc.) programmatically in
the COM add-in? How do we distribute/publish our custom forms to the
users so that they can get our custom forms/fields/actions?

If we can actually create and use custom forms programmatically, are
there any known issues of using custom forms? We know that when
customizing Outlook forms, there are some areas where a customized
form may not behave like a standard Outlook form. In our situation,
what are the known areas that will not behave as usual if custom forms
are used?

Thank you very much for any hints or suggestions,
Jenny
 
K

Ken Slovak - [MVP - Outlook]

The proof is in the fact that none of those things or the InfoBar is
exposed to the object model.

You can design a custom form that puts up your own lable control or
something to replace the InfoBar, that isn't displayed in a custom
form anyway.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
J

Jenny Tam

Talking about designing a custom form, there are lots of examples of
how to do that from the Outlook UI, but not programmatically. From
your first reply, you said that adding custom controls
programmatically wasn't a good idea. So what options do I have?

Another idea I have is as follows:

Somehow tag the exported email by adding new user properties to it
programmatically:
Exported = True
Timestamp = July 23, 2003 4:09PM

Therefore, as soon as the user exports an email, I will create these
two user properties and attach them to that email. When the user hits
the Export button again, I will display a dialog that this email has
been exported at what time.

However, MailItem.UserProperties is read-only. Does my idea work at
all? I don't have to use UserProperties, but I want something that
sticks to the email such that when the user exits and launches Outlook
again, the properties stay.

Thanks again for your help!
Jenny



Ken Slovak - said:
The proof is in the fact that none of those things or the InfoBar is
exposed to the object model.

You can design a custom form that puts up your own lable control or
something to replace the InfoBar, that isn't displayed in a custom
form anyway.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Jenny Tam said:
Thank you very much for your prompt reply. I figured that the answer
is NO from various posts in the newsgroup. I suggested to the project
team that we can use the 'Follow up Flag', write our own message and
complete it. Then we have our own message plus the timestamp.
However, they don't like it because the user can easily clear it or
once the user use the follow up flag again, our custom message is
gone. Therefore, the project team really wants me to 'prove' that
what they want cannot be done.

Do you know, by any chance, of any KB article about any of my
questions? Unfortunately, KB 294868 does not help me much. :(

Thanks
Jenny
 
K

Ken Slovak - [MVP - Outlook]

You should never design a form or add controls to it in code, that
will one-off the form. You can however design the form in design mode
and change the values in the controls on the form or the
UserProperties collection in your code.

To add a new UserProperty to the UserProperties collection you do the
same as you would with any collection, use the Add method. See the
Help in the Outlook VBA Object Browser for information and code
samples for that method.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
J

Jenny Tam

Yes I'm planning to add new user properties to the exported mail item.

However, I believe the users cannot see the user properties until they
customize the view themselves (I mean they have to do it manually) to
include the user properties in the message view? Or am I missing
something?

Thanks for all your help!! Your answers really help me get going!
Jenny



Ken Slovak - said:
You should never design a form or add controls to it in code, that
will one-off the form. You can however design the form in design mode
and change the values in the controls on the form or the
UserProperties collection in your code.

To add a new UserProperty to the UserProperties collection you do the
same as you would with any collection, use the Add method. See the
Help in the Outlook VBA Object Browser for information and code
samples for that method.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm

Jenny Tam said:
Talking about designing a custom form, there are lots of examples of
how to do that from the Outlook UI, but not programmatically. From
your first reply, you said that adding custom controls
programmatically wasn't a good idea. So what options do I have?

Another idea I have is as follows:

Somehow tag the exported email by adding new user properties to it
programmatically:
Exported = True
Timestamp = July 23, 2003 4:09PM

Therefore, as soon as the user exports an email, I will create these
two user properties and attach them to that email. When the user hits
the Export button again, I will display a dialog that this email has
been exported at what time.

However, MailItem.UserProperties is read-only. Does my idea work at
all? I don't have to use UserProperties, but I want something that
sticks to the email such that when the user exits and launches Outlook
again, the properties stay.

Thanks again for your help!
Jenny
 
J

Jenny Tam

Thank you very much for your help!
Jenny


Ken Slovak - said:
The users would have to customize a view to see any user defined
fields in the items and the fields would have to be defined in the
folder. See http://www.slipstick.com/dev/forms.htm for more Outlook
forms design information and specifically see
http://www.slipstick.com/dev/copyfolderdesign.htm for information
about folder design and distributing views.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm

Jenny Tam said:
Yes I'm planning to add new user properties to the exported mail item.

However, I believe the users cannot see the user properties until they
customize the view themselves (I mean they have to do it manually) to
include the user properties in the message view? Or am I missing
something?

Thanks for all your help!! Your answers really help me get going!
Jenny
 

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