Erika Ehrli - Adventures with Office Products & Technologies
MSDN & TechNet: Releasing Office, SharePoint, Exchange & Lync Centers and content for developers and IT professionals.

February, 2006

  • Erika Ehrli - Adventures with Office Products & Technologies

    The official name: 2007 Microsoft® Office system


    Finally, I am able to spell the real name for the next version of Office: 2007 Microsoft® Office system.

    For those of you who have not seen the press passes and want to catch-up here is a list with some of them:

    See the 2007 Microsoft Office System Pricing and the 2007 Microsoft Office System Packaging.

    Maybe you have heard that this is the biggest release of the decade, and I can tell you that this version of Office has great potential as a development platform. Lots of features/enhancements were announced on Beta 1 and for Beta 2 there are more cool surprises waiting to be announced.

    My latest experiment with 2007 Microsoft® Office :) is exporting an ASP.NET 2.0 GridView to Excel 2007. If you use the following code snippet, you will be able to export the content of a SqlDataSource (used to DataBind a GridView) to Excel (without automation):

       protected void ExportToExcel() {
    Response.Buffer = true;
    Response.ContentType "application/";
    Response.Charset "";
    .EnableViewState = false;

    System.IO.StringWriter sw = new System.IO.StringWriter();
    System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);

    GridView grid = new GridView();
    grid.DataSource SqlDataSource1.Select(DataSourceSelectArguments.Empty);
    grid.AutoGenerateColumns = true;


    We built a Web based application for MSDN content management, and we export reports to Excel 2003 using the previous snippet of code. One thing that we don't like is that we lose all formatting, so we have the data, but then we have to make it pretty again.

    I ran the same process on a machine where I have the last build of 2007 Microsoft® Office and Excel 2007 is smart enough to keep my formatting. Another cool enhancement. For those of you who have Beta 1, please give it a try.

  • Erika Ehrli - Adventures with Office Products & Technologies

    How to: Generate autonumbered lists using WordML (2003)


    I was reading today an internal distribution list and I saw an interesting thread about autonumbered lists using WordML (2003):

    "I embarked on a journey to try and transform InfoPath rich text (xhtml) to WordML. I encounter a problem when I try to transform a rich text node that contains multiple numbered lists: in the rich text they both number from 1-3, but in Word the result is 1,2,3 and 4,5,6."

    Zander Westendarp provides a great workaround: If you increment the value of the w:listDefId elements for each element, you can get autonumbered lists that always restart the numbering.

    When I work with WordML or SpreadsheetML, I always build a template of the document/spreadsheet that I want to generate and save it as XML. It's the best way to get started with the code that you want to generate. I made an experiment to test this approach and explore the resulting WordML. Follow these simple steps...

    1. Start Microsoft Word 2003.
    2. Create a document with two sets of numbered lists as shown in Figure 1:

      Figure 1. Create two sets of autonumbered lists

    3. On the File menu, click Save As.
    4. In the Save as type list, select the XML Document (*.xml) option.
    5. In the File name box, type a new name for the document.
    6. Click Save.

    Once you create the XML Document file, you can open the file using a text editor program to explore the content of the file. Find all the w:listDef elements and you will see how the w:listDefId attribute is always incremented.

    Tip: If you want to see a nice and readable indented XML file, see this blog entry.

    I know that WordML is a big topic and every document is a separate story. Newsgroups, forums, and DLs are always full of different questions. Taking about lists is just a single topic - that by the way is huge and complex by itself. Fortunately there are documents, articles, books, and cool bloggers who share their knowledge.

    Here are some WordML resources that I use when I am stuck with WordML:

    1. Overview of WordprocessingML.
    2. XML Schema Reference
    3. Office 2003 XML
    4. Office 2003 XML for Power Users
    5. Powering Office 2003 with Office XML
    6. XML in Office 2003: Information Sharing with Desktop XML 

    If you want to learn more about lists and WordML, read Oleg Tkachenko's blog entry: Generating WordprocessingML using XSLT: Lists. Also read John Durant's blog entry: WordProcessingML, XML, and Lists.

    Finally, to learn WordML, divide and conquer, that's my strategy...

  • Erika Ehrli - Adventures with Office Products & Technologies

    Visio Connector for Project/EPM/SPS


    You should check this out! Imtiyaz Mubarak (a developer, Microsoft Parter, and friend from India) along with Chris Castillo from the Visio team created and published a component that provides a Visio Add-In and a Project Add-In that integrates Visio 2003, Project Server and MS SharePoint Server. This component allows you to:

    • Generate Project Plans from the Visio Process Flow  Diagrams.
    • Generate Project Plans from WBS.
    • Generate SharePoint Tasks from the Visio Process Flow Diagrams.
    • Report the Status of the tasks from Microsoft Project Plan stored locally or in a Project Server.
    • Report the Status of the tasks from Microsoft SharePoint Portal Server.
    • Generate a Portfolio View in Visio from Microsoft Project Server.
    • Generate Visio Process Flow Diagram from MS Project Plan through MS Project Add-Ins.

    This component is published in GotDotNet and it’s really cool. This is the kind of stuff that solves business needs and I love that it integrates different Office technologies. I am sharing with you the link where you can download the solution along with source code and a document that explains the architecture and code.

     This is good stuff!

  • Erika Ehrli - Adventures with Office Products & Technologies

    MS + Office + Channel 9: Meet the guys, learn about new features, and have a good laugh


    The Channel 9 team has defined a new level of communication between Microsoft and developers and one of the most popular content items offered on this space are video interviews. The interesting thing about these videos is that they allow us to see the human being behind the technology and learn more about the possibilities offered by a product or feature.

    The video interviews are done to different Microsoft personalities in a casual way described by Scoble as "peer-to-peer over a beer." Once the interview is recorded, the Channel 9 team publishes and developers are able to comment and ask questions related to the interview through a forum. These videos are state-of-the-art for self training, it only takes you some minutes to learn something new, and by the way, they are hilarious.

    The Channel 9 team has done some video interviews related with 2007 Microsoft® Office system (Office "12") that you should not miss:

    We are working together to offer more videos related with Office development. I think it's an interesting opportunity to meet all the great people that have been working with Office and to learn more about the cool things you will be able to implement thanks to the 2007 Microsoft® Office system.

Page 1 of 1 (4 items)