none
Backstage office 2010 show list of files in directory RRS feed

  • Question

  • I would like to create a special backstage tab.

    1)

    I' m looking for a way to show the contents of a directory (filtered by filetype, showing a scrollbar if neccesary). Is this possible?

    2)

    If so, is it possible to show a preview of the file in the backstagetab when selecting one of those files?

    Maarten


    • Edited by easyit-mjh Tuesday, January 31, 2012 9:06 AM
    Tuesday, January 31, 2012 9:04 AM

Answers

  • Ok thank you, it s a language thing, i would have called that a filedialog box...

     

     

     

     

    • Marked as answer by easyit-mjh Wednesday, February 1, 2012 9:32 PM
    Wednesday, February 1, 2012 9:32 PM

All replies

  • Hi Maarten

    (1) is certainly possible, although there's nothing built into Word/Office or the Ribbon that will hand this to you on a platter. You need to build the list using the standard directory/file tools in the API/programming language you're using.  How you display it will depend very much on what you expect the user to do with it, which you don't mention.

    (2) That depends on what you want to show. If these are text files you can certainly extract and display the text. If they're something else, then you have to have some way to generate a picture of the content, save that picture to disk then load it into a control. There's no "preview" functionality in the Office or Backstage APIs.


    Cindy Meister, VSTO/Word MVP
    Tuesday, January 31, 2012 1:03 PM
    Moderator
  • Hi Cindy,

    Thank you for your reply. What I would like to achieve is the following:

    (also see the image - which is photoshopped by the way)

    A custom backstage tab, which holds four areas:

    1 left column top: a view fields in which the user enters a project number (yellow field). The user clicks the button "select project", then the second part (2. left column middle) fills with all relevant files.

    When the user clicks on one of the files, it should preview in the second column

    the fourth part is the first column, left, which holds all relevant templates.

    This is something that is working in office2003, we would like to switch to 2010 and use backstage.

     


    Tuesday, January 31, 2012 2:39 PM
  • Hi Maarten

    I'm afraid you're not going to be able to get anything similar to what you show.

    For one thing, there's not "list box" type of control for the Ribbon/Backstage. Closest you can get is a Gallery, which means the user has to click a button to see the list.

    Anything else (such as writing the list out as text) won't be actionable/clickable.

    Note that even the Office products, themselves, use dialog boxes and not the Backstage for this kind of thing.


    Cindy Meister, VSTO/Word MVP
    Tuesday, January 31, 2012 2:59 PM
    Moderator
  • Hi Cindy,

     

    Thanks again, I do have a question regarding uyour answer. You mention a list box control, I'm not sure how that relates to my question (probably a language issue - I'm Dutch). So do you mean with the list box the list of projectfiles (left column, middle section)? Or something else?

     

     

    Maarten

    Wednesday, February 1, 2012 5:21 PM
  • Hi Maarten

    In your screen shot you show a list box with files. The Ribbon UI / Backstage has no comparable control - no list box.


    Cindy Meister, VSTO/Word MVP
    Wednesday, February 1, 2012 6:24 PM
    Moderator
  • Ok thank you, it s a language thing, i would have called that a filedialog box...

     

     

     

     

    • Marked as answer by easyit-mjh Wednesday, February 1, 2012 9:32 PM
    Wednesday, February 1, 2012 9:32 PM