A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to change the Title of a form region at runtime?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 13th 09, 07:57 AM posted to microsoft.public.outlook.program_addins
Mark B[_2_]
external usenet poster
 
Posts: 93
Default How to change the Title of a form region at runtime?

OL2007, VSTO C#.

Does anyone know how to change the Title of a form region at runtime?
Ads
  #2  
Old October 13th 09, 02:54 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to change the Title of a form region at runtime?

I don't believe you can, other than changing the XML before it's supplied to
the handler.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mark B" wrote in message
...
OL2007, VSTO C#.

Does anyone know how to change the Title of a form region at runtime?


  #3  
Old October 16th 09, 03:54 AM posted to microsoft.public.outlook.program_addins
Mark B[_2_]
external usenet poster
 
Posts: 93
Default How to change the Title of a form region at runtime?

The following works until I modify the design of the region in the Designer
at which point the designer naturally overwrites my code. No doubt that's
why it says "Required method for Designer support - do not modify ".

I wonder if anyone has any examples then of how I would modify the XML file
directly. I would need to put the result of a method call to get the dynamic
text, that is, in this case, FText.GetText(1298).


#region Form Region Designer generated code

/// summary
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// /summary
private static void
InitializeManifest(Microsoft.Office.Tools.Outlook. FormRegionManifest
manifest)
{
manifest.FormRegionType =
Microsoft.Office.Tools.Outlook.FormRegionType.Adjo ining;
manifest.ShowInspectorCompose = false;
manifest.ShowInspectorRead = false;
manifest.Title = "My Static Title";
manifest.Title = FText.GetText(1298);
}
#endregion






"Ken Slovak - [MVP - Outlook]" wrote in message
...
I don't believe you can, other than changing the XML before it's supplied
to the handler.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mark B" wrote in message
...
OL2007, VSTO C#.

Does anyone know how to change the Title of a form region at runtime?



  #4  
Old October 16th 09, 03:00 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to change the Title of a form region at runtime?

You would have to not use the VSTO designer and code everything yourself.
But even there you have to get whatever text you want and supply it once,
and you'd have to create the XML you supply on the fly or modify it on the
fly to do that before supplying it. Once you supplied the XML you couldn't
change it again for that form region.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mark B" wrote in message
...
The following works until I modify the design of the region in the
Designer at which point the designer naturally overwrites my code. No
doubt that's why it says "Required method for Designer support - do not
modify ".

I wonder if anyone has any examples then of how I would modify the XML
file directly. I would need to put the result of a method call to get the
dynamic text, that is, in this case, FText.GetText(1298).


#region Form Region Designer generated code

/// summary
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// /summary
private static void
InitializeManifest(Microsoft.Office.Tools.Outlook. FormRegionManifest
manifest)
{
manifest.FormRegionType =
Microsoft.Office.Tools.Outlook.FormRegionType.Adjo ining;
manifest.ShowInspectorCompose = false;
manifest.ShowInspectorRead = false;
manifest.Title = "My Static Title";
manifest.Title = FText.GetText(1298);
}
#endregion


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read color of form region title? Mark B[_2_] Add-ins for Outlook 1 October 13th 09 02:49 PM
Right-align form region? Mark B[_2_] Add-ins for Outlook 0 October 10th 09 01:23 AM
The Form Region,"IPM".note.microsoft conversation.Region Alex Outlook - Using Contacts 1 June 7th 09 09:59 PM
Form Region Faisal Outlook - Using Forms 3 June 2nd 09 02:23 PM
'adjoining' form region Alan Outlook - Using Forms 1 May 29th 07 05:42 PM


All times are GMT +1. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.