PC Review


Reply
Thread Tools Rate Thread

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

 
 
Mark B
Guest
Posts: n/a
 
      13th Oct 2009
OL2007, VSTO C#.

Does anyone know how to change the Title of a form region at runtime?
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      13th Oct 2009
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> OL2007, VSTO C#.
>
> Does anyone know how to change the Title of a form region at runtime?


 
Reply With Quote
 
Mark B
Guest
Posts: n/a
 
      16th Oct 2009
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.Adjoining;
manifest.ShowInspectorCompose = false;
manifest.ShowInspectorRead = false;
manifest.Title = "My Static Title";
manifest.Title = FText.GetText(1298);
}
#endregion






"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> OL2007, VSTO C#.
>>
>> Does anyone know how to change the Title of a form region at runtime?

>


 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      16th Oct 2009
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" <(E-Mail Removed)> wrote in message
news:%23TlC%(E-Mail Removed)...
> 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.Adjoining;
> manifest.ShowInspectorCompose = false;
> manifest.ShowInspectorRead = false;
> manifest.Title = "My Static Title";
> manifest.Title = FText.GetText(1298);
> }
> #endregion
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read color of form region title? Mark B Microsoft Outlook Program Addins 1 13th Oct 2009 02:49 PM
VB 2005 ReportViewer to change the chart title on runtime Lemune Microsoft VB .NET 1 11th Jul 2007 10:18 AM
Form Names Not Visible In Title Bar-Access Runtime =?Utf-8?B?VGFtbXkgU2FuZGVycw==?= Microsoft Access Forms 3 15th Aug 2006 09:09 PM
changing text in the form title bar....compile and runtime error Microsoft VB .NET 3 6th Feb 2005 03:15 AM
Change Form Title Derek Microsoft Outlook Form Programming 4 3rd Sep 2003 01:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:10 AM.