none
Outlook Form Region > How to show/hide the Form Region? RRS feed

  • Question

  • Hello,

    I am new to using Form Region of Outlook (Meeting) in Visual Studio and want to know how to show/hide the Form Region?

    And also I would like to display Form Region only for Meeting not for appointment?
    How can I achieve this?

    Please guide.

    Thanks,
    Wednesday, May 4, 2016 1:03 PM

Answers

  • Hi Ujjval,

    >> I would like to display Form Region only for Meeting not for appointment?

    Both Meeting and appointment use FormRegionMessageClassAttribute.Appointment, if you want to display only for meeting, I suggest you check OlMeetingStatus of e.OutlookItem, if it equals olMeeting, it is meeting, otherwise, set e.Cancel to true.

    >> Form Region of Outlook (Meeting) in Visual Studio and want to know how to show/hide the Form Region?

    Do you want to show/hide content of Form Region like controls or you want to hide all the form region? If you want to hide all the form region, I think it is impossible, and I suggest you try task pane instead of form region. If you just want to hide the content of form region, you could try formRegion1.Visible.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, May 5, 2016 6:05 AM
  • Hi Ujaval,

    After checking the method of FormRegion object, there is no such method. If this is a feature you want to include in the future, I suggest you submit a feedback in the link below,

    https://outlook.uservoice.com/

    If your original issue has been resolved, I suggest you mark the helpful reply as answer to close this thread.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, May 6, 2016 2:34 AM
  • Tuesday, May 10, 2016 1:47 PM

All replies

  • Hello Ujjval,

    You need to associate a form region with a particular message class. Check out the MessageClass property of the appointment and meeting items. Looks like you just need to associate a form region with the message class (meetings).

    There might be situations in which you do not want Microsoft Office Outlook to display a form region for a particular item. For example, if a contact item does not contain a business address, you can prevent a form region that shows the location of the business in a map from appearing. In that case you can add code to the FormRegionInitializing event handler that sets the Cancel property of the FormRegionInitializingEventArgs class to true.

    private void MapItFactory_FormRegionInitializing(object sender,
        Microsoft.Office.Tools.Outlook.FormRegionInitializingEventArgs e)
    {
        Outlook.ContactItem myItem = (Outlook.ContactItem)e.OutlookItem;
    
        if (myItem != null)
        {
            if ((myItem.BusinessAddress != null &&
                    myItem.BusinessAddress.Trim().Length > 0) ||
                (myItem.HomeAddress != null && 
                    myItem.HomeAddress.Trim().Length > 0) ||
                (myItem.OtherAddress != null && 
                    myItem.OtherAddress.Trim().Length > 0))
            {
                return;
            }
        }
    
        e.Cancel = true;
    }

    Or just simply use the Visible property of the Visible property of the FormRegion class which returns or sets a Boolean value that indicates whether the form region is visible or hidden. True if the form region is visible; False if it is hidden. The default is True. Note, the Visible property was added in Outlook 2010. 

    Also you may find the following links helpful:

    Hiding and Showing an Adjoining Outlook Form Region

    Creating Outlook Form Regions

     


    [custom.development]

    Wednesday, May 4, 2016 1:49 PM
  • Hi Ujjval,

    >> I would like to display Form Region only for Meeting not for appointment?

    Both Meeting and appointment use FormRegionMessageClassAttribute.Appointment, if you want to display only for meeting, I suggest you check OlMeetingStatus of e.OutlookItem, if it equals olMeeting, it is meeting, otherwise, set e.Cancel to true.

    >> Form Region of Outlook (Meeting) in Visual Studio and want to know how to show/hide the Form Region?

    Do you want to show/hide content of Form Region like controls or you want to hide all the form region? If you want to hide all the form region, I think it is impossible, and I suggest you try task pane instead of form region. If you just want to hide the content of form region, you could try formRegion1.Visible.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, May 5, 2016 6:05 AM
  • Thank you for reply

    Is there any way to expand/collapsed the Form Region dynamically?

    Thanks,

    Ujaval

    Thursday, May 5, 2016 1:04 PM
  • Hi Ujaval,

    After checking the method of FormRegion object, there is no such method. If this is a feature you want to include in the future, I suggest you submit a feedback in the link below,

    https://outlook.uservoice.com/

    If your original issue has been resolved, I suggest you mark the helpful reply as answer to close this thread.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, May 6, 2016 2:34 AM
  • Outlook form regions don't provide anything for that. You may consider using Advanced Outlook view and form regions instead. They provide all the required method and properties for that.

    [custom.development]

    Friday, May 6, 2016 5:23 AM
  • Hello,

    I  would like to expand/collapse the form region (Highlighted in the below screen).

    I am able to see the (-) button.

    Is there any way to expand or collapse the form region?

    Please guide

    Thanks,

    Tuesday, May 10, 2016 1:30 PM
  • Tuesday, May 10, 2016 1:47 PM
  • Hi Ujjval,

    As my above reply, there is no method to expand/collapse the form region by code, you could only expand/collapse the form region manually.

    Otherwise, I suggest you refer the suggestion from Eugene, and develop with task pane instead of Form Region.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, May 11, 2016 5:45 AM
  • Hello,

    I have implemented the outlook form region and when I run the project from Visual Studio, I am able to see the form region in outlook 2013. 

    But, after creating set up I have installed it on QA server having outlook 2016.  Then, the outlook form region is not displayed.

    Please guide.

    Thanks,

    Tuesday, May 17, 2016 12:58 PM
  • Hi Ujjval,

    >>after creating set up I have installed it on QA server having outlook 2016.  Then, the outlook form region is not displayed.

    For this new issue, I would suggest you post a new thread, and then share us information about which way you set up, and what is QA server, it would be helpful if you could share us more information in new thread, and then we could focus on this new issue.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, May 18, 2016 7:57 AM