Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Displaying custom fields (http://www.outlookbanter.com/add-ins-outlook/77743-displaying-custom-fields.html)

[email protected] August 28th 08 05:43 PM

Displaying custom fields
 
I have created an add-in in vs2005 c# which is adding custom
properties to mails, and I wish to display these custom properties in
the folder view.

I have found various postings detailing cfg files to allow display of
extended mapi properties such as the sender email address, but i'm not
sure how to modify these cfg files to allow me to display the custom
fields I have created.

Can anyone explain to me how to do this, or more simply what the
various sections in the cfg file refer to so that I can create my own?
I can't find any detail about creating these files, just prepared
examples for specific extended mapi properties.

Alternatively, i'd be happy with displaying the custom fields on a
custom form displayed instead of the ipm.note standard form.

Any help would be appreciated.

Sue Mosher [MVP-Outlook] August 29th 08 03:09 AM

Displaying custom fields
 
You don't need a .cfg file to display a property you've added through
MailItem.UserProperties.Add. The third parameter for that property needs to
be True, in order to add it to the properties defined at the folder level.
Once you've done that, you can display the property by modifying the value of
View.XML in Outlook 2003 or, in Outlook 2007, using the TableView.ViewFields
collection. For best results, your application should create and apply its
own new view, rather than modifying the currently displayed view.

If you're targeting Outlook 2007, you can display the custom fields in a
form region.

TIP: Always specify the Outlook version(s) you're targeting when you post,
as there are significant differences between them.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



" wrote:

I have created an add-in in vs2005 c# which is adding custom
properties to mails, and I wish to display these custom properties in
the folder view.

I have found various postings detailing cfg files to allow display of
extended mapi properties such as the sender email address, but i'm not
sure how to modify these cfg files to allow me to display the custom
fields I have created.

Can anyone explain to me how to do this, or more simply what the
various sections in the cfg file refer to so that I can create my own?
I can't find any detail about creating these files, just prepared
examples for specific extended mapi properties.

Alternatively, i'd be happy with displaying the custom fields on a
custom form displayed instead of the ipm.note standard form.

Any help would be appreciated.


[email protected] August 29th 08 03:26 PM

Displaying custom fields
 
Thanks Sue. It is OL2007 i'm targetting, and i'm well on my way now.
I'm creating the folder in question at run time, so all I have to do
now is set the view after creating the folder and i'm there.

Much appreciated!

[email protected] August 29th 08 03:26 PM

Displaying custom fields
 
Thanks Sue. It is OL2007 i'm targetting, and i'm well on my way now.
I'm creating the folder in question at run time, so all I have to do
now is set the view after creating the folder and i'm there.

Much appreciated!

Doobs September 1st 08 05:24 PM

Displaying custom fields
 
I now have this working fine, using a combination of Redemption and
the Outlook Object Model. Myissue now is that when I open a message, I
would like the additional fields to be displayed in the form.

Is there a way to amend the form in code, rather than creating and
deploying a custom form and associating it with the custom message
class? There seems to be a vast amount of info out there on custom
forms, but i'm having trouble finding examples of exactly what I want
to do.

On Aug 29, 3:26*pm, wrote:
Thanks Sue. It is OL2007 i'm targetting, and i'm well on my way now.
I'm creating the folder in question at run time, so all I have to do
now is set the view after creating the folder and i'm there.

Much appreciated!



Sue Mosher [MVP-Outlook] September 1st 08 09:18 PM

Displaying custom fields
 
Outlook 2007's new forms region feature would be a good fit with what you're
add-in is doing so far. See http://www.outlookcode.com/news.aspx?id=22 to get
started.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Doobs" wrote:

I now have this working fine, using a combination of Redemption and
the Outlook Object Model. Myissue now is that when I open a message, I
would like the additional fields to be displayed in the form.

Is there a way to amend the form in code, rather than creating and
deploying a custom form and associating it with the custom message
class? There seems to be a vast amount of info out there on custom
forms, but i'm having trouble finding examples of exactly what I want
to do.

On Aug 29, 3:26 pm, wrote:
Thanks Sue. It is OL2007 i'm targetting, and i'm well on my way now.
I'm creating the folder in question at run time, so all I have to do
now is set the view after creating the folder and i'm there.



Doobs September 2nd 08 06:19 PM

Displaying custom fields
 
Thanks Sue. I'm using a form region now, as described in the
walkthrough, and i have the "Hello World" type example working fine.

What I can't manage to work out is how to modify the controls on the
form region from within my main addin code. I'm working in c# by the
way.

All I want to do is change the caption of a label field or the text of
a textbox, but I don't seem to be able to reference these controls
from my addin code. I must be missing something in the examples.

On Sep 1, 9:18*pm, Sue Mosher [MVP-Outlook]
wrote:
Outlook 2007's new forms region feature would be a good fit with what you're
add-in is doing so far. Seehttp://www.outlookcode.com/news.aspx?id=22to get
started.
--
Sue Mosher, Outlook MVP
* *Author of Microsoft Outlook Programming: Jumpstart
* * * for Administrators, Power Users, and Developers
* * *http://www.outlookcode.com/jumpstart.aspx

"Doobs" wrote:
I now have this working fine, using a combination of Redemption and
the Outlook Object Model. Myissue now is that when I open a message, I
would like the additional fields to be displayed in the form.


Is there a way to amend the form in code, rather than creating and
deploying a custom form and associating it with the custom message
class? There seems to be a vast amount of info out there on custom
forms, but i'm having trouble finding examples of exactly what I want
to do.


On Aug 29, 3:26 pm, wrote:
Thanks Sue. It is OL2007 i'm targetting, and i'm well on my way now.
I'm creating the folder in question at run time, so all I have to do
now is set the view after creating the folder and i'm there.



Sue Mosher [MVP-Outlook] September 2nd 08 07:22 PM

Displaying custom fields
 
What event are you using? In other words, when are you trying to modify those
control properties?

Also, for a bound control, you should change the underlying Outlook property
value, not the control value.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"Doobs" wrote:

Thanks Sue. I'm using a form region now, as described in the
walkthrough, and i have the "Hello World" type example working fine.

What I can't manage to work out is how to modify the controls on the
form region from within my main addin code. I'm working in c# by the
way.

All I want to do is change the caption of a label field or the text of
a textbox, but I don't seem to be able to reference these controls
from my addin code. I must be missing something in the examples.

On Sep 1, 9:18 pm, Sue Mosher [MVP-Outlook]
wrote:
Outlook 2007's new forms region feature would be a good fit with what you're
add-in is doing so far. Seehttp://www.outlookcode.com/news.aspx?id=22to get
started.



Doobs September 5th 08 03:40 PM

Displaying custom fields
 
I'm trying to edit the controls on form load, i've set the custom
properties on the mails as i've created them in the fodler, and I
simply want to display them when the user opens the mail.

I'll have a look at the underlying property, as you suggest. Thanks.

On 2 Sep, 19:22, Sue Mosher [MVP-Outlook]
wrote:
What event are you using? In other words, when are you trying to modify those
control properties?

Also, for a bound control, you should change the underlying Outlook property
value, not the control value.
--
Sue Mosher, Outlook MVP
* *Author of Microsoft Outlook Programming: Jumpstart
* * * for Administrators, Power Users, and Developers
* * *http://www.outlookcode.com/jumpstart.aspx

"Doobs" wrote:
Thanks Sue. I'm using a form region now, as described in the
walkthrough, and i have the "Hello World" type example working fine.


What I can't manage to work out is how to modify the controls on the
form region from within my main addin code. I'm working in c# by the
way.


All I want to do is change the caption of a label field or the text of
a textbox, but I don't seem to be able to reference these controls
from my addin code. I must be missing something in the examples.


On Sep 1, 9:18 pm, Sue Mosher [MVP-Outlook]
wrote:
Outlook 2007's new forms region feature would be a good fit with what you're
add-in is doing so far. Seehttp://www.outlookcode.com/news.aspx?id=22toget
started.



Sue Mosher [MVP-Outlook] September 5th 08 03:58 PM

Displaying custom fields
 
See Ryan Gregg's blog post at
http://blogs.msdn.com/rgregg/archive...-controls.aspx.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"Doobs" wrote:

Thanks Sue. I'm using a form region now, as described in the
walkthrough, and i have the "Hello World" type example working fine.

What I can't manage to work out is how to modify the controls on the
form region from within my main addin code. I'm working in c# by the
way.

All I want to do is change the caption of a label field or the text of
a textbox, but I don't seem to be able to reference these controls
from my addin code. I must be missing something in the examples.

On Sep 1, 9:18 pm, Sue Mosher [MVP-Outlook]
wrote:
Outlook 2007's new forms region feature would be a good fit with what you're
add-in is doing so far. Seehttp://www.outlookcode.com/news.aspx?id=22to get
started.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Doobs" wrote:
I now have this working fine, using a combination of Redemption and
the Outlook Object Model. Myissue now is that when I open a message, I
would like the additional fields to be displayed in the form.


Is there a way to amend the form in code, rather than creating and
deploying a custom form and associating it with the custom message
class? There seems to be a vast amount of info out there on custom
forms, but i'm having trouble finding examples of exactly what I want
to do.


On Aug 29, 3:26 pm, wrote:
Thanks Sue. It is OL2007 i'm targetting, and i'm well on my way now.
I'm creating the folder in question at run time, so all I have to do
now is set the view after creating the folder and i'm there.





All times are GMT +1. The time now is 12:28 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-2006 OutlookBanter.com