none
Create Notification area in Excel workbook

    Question

  • Hi All,

    I have a requirement where i need to create a notification area on Excel workbook to show user about some status of a transaction.

    I will have a comminication module which gets updated information from server regarding the transaction made from Excel workbook.

    It gets the response in form of a xml and with some status set: Job completed,Job Processeing,Job errored out,Job not found

    These status i have to show on the perticaular Excel workbook if opened or on the document open event.

    Can anybody suggested some idea on the notifiaction area on a Excel sheet.

    Note : In Excel 2007 i found that SmartArt are available but not in Excel 2003

    Thanks

    Dwiipayan Das
    Dwipayan Das
    Wednesday, December 02, 2009 6:50 AM

Answers

  • Hi Dwipayan Das

    Does this have to be ON the worksheet (so that it will be saved with the workbook)? Or could you use a Task Pane? (Note: since you're posting in the VSTO forum, my suggestions are going to be VSTO-related.)

    If it needs to be on the worksheet, do you know what areas of the worksheet are going to be free? In that case, just set a specific Range, give it a name to make it easier to address, and write to the Named Range.

    Or, since you seem to be playing with the idea of using something "pinned" onto the sheet, you could use an AutoShape (drawing object). There are a number of pre-drawn Shapes that can be inserted. All of these have a TextFrame.TextRange property, so that you can write Text to it. The most "obvious" of these AutoShapes would be a Textbox, but you can use any of the others in the same manner. (SmartArt is new in 2007, so if you need a solution that supports both 2003 and 2007 solutions, you can't  use that.)
    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Thursday, December 10, 2009 2:11 AM
    Wednesday, December 02, 2009 7:22 AM

All replies

  • Hi Dwipayan Das

    Does this have to be ON the worksheet (so that it will be saved with the workbook)? Or could you use a Task Pane? (Note: since you're posting in the VSTO forum, my suggestions are going to be VSTO-related.)

    If it needs to be on the worksheet, do you know what areas of the worksheet are going to be free? In that case, just set a specific Range, give it a name to make it easier to address, and write to the Named Range.

    Or, since you seem to be playing with the idea of using something "pinned" onto the sheet, you could use an AutoShape (drawing object). There are a number of pre-drawn Shapes that can be inserted. All of these have a TextFrame.TextRange property, so that you can write Text to it. The most "obvious" of these AutoShapes would be a Textbox, but you can use any of the others in the same manner. (SmartArt is new in 2007, so if you need a solution that supports both 2003 and 2007 solutions, you can't  use that.)
    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Thursday, December 10, 2009 2:11 AM
    Wednesday, December 02, 2009 7:22 AM
  • Hi Cindy Meister,

    Thanks a lot for the immediate response.

    My plan is to place it on the toolbar area where Excel CommandBar stays .

    When ever i will move from my manged workbook to unmanaged worbook the notifiaction area will be disabled and enabled.

    And the top area of workbook is also friendly to the user ,so he can easily track of the transaction status made.

    I am planing to migrate my current application which is a COM-Addin base project to VSTO 2005 and i have to prepare a separate code base to support Office products higher than Office 2007.So i can use much new features of Office.

    Can you help me preparing a list of some cool features (better user's experience point of view) which VSTO (Office 2007-->) provides in comparison to old technology  .


    Thanks

    Dwipayan Das

    Dwipayan Das
    • Edited by Dwipayan Das Wednesday, December 02, 2009 10:15 AM i am poor in english
    Wednesday, December 02, 2009 8:27 AM
  • Hi Cindy Meister,

    I tried to create a sample taskpane using Office 2003 assembly  but it seems the Microsoft.Office.Tools.CustomTaskPane is obsolte now.

    It is only available at  Microsoft.Office.Tools.Common2007 .

    Thanks

    Dwipayan Das


    Dwipayan Das
    Wednesday, December 02, 2009 11:30 AM
  • Hi,

    I am completely stucked now and not able to add any .NET Controls to the Excel workbook area.

    Please help me on this item.

    Thanks

    Dwipayan Das

    Dwipayan Das
    Thursday, December 03, 2009 12:22 PM
  • Hello Dwipayan,

    First, it is not recommended to create an add-in for multiple version of Excel. If still want to do that, we need to target the lowest common denominator (Excel 2003). So here, we just only use the features in Office 2003 not Office 2007. For this point, please refer to this thread: Building Outlook addins (compatibility office 2003 and 2007; Primary Interop Assemblies (PIA) are missing).

    Yes, you are right. Custom Task pane is a new feature in Office 2007. Have you tried to use Autoshape of Excel?  For shapes, please refer to this MSDN article: Shape Interface. For example, you could add a text box to worksheet. Code like this,

                Excel.Shape shape=this.Shapes.AddTextbox(Microsoft.Office.Core.MsoTextOrientation.msoTextOrientationHorizontal,100,100,100,100);
                shape.TextFrame2.TextRange.Text = "Hello";

    <<My plan is to place it on the toolbar area where Excel CommandBar stays >>
    Also you could add a control to toolbar, and then set text to it. For this, you could search this forum, and you will find a lot of threads.

    Best regards,
    Bessie

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, December 04, 2009 7:20 AM