Office Development with Visual Studio

Develop Office Business Applications using Visual Studio

November, 2008

Posts
  • Office Development with Visual Studio

    Office Development with Visual Studio Developer Center Just Launched! (Beth Massi)

    • 2 Comments

    Everything you need to know about building Office solutions in Visual Studio is on the new Office Development with Visual Studio Developer Center! (update your bookmarks: http://msdn.com/vsto)

    - Right on the home page meet MVPs and members of the product team who share tips, tricks, presentations, and trip reports about meeting developers like you.

    - Download code samples and tools that showcase Office and Visual Studio features or access shared source projects on Codeplex that are using Visual Studio to build Office solutions.

    - Watch educational and entertaining videos about Office development, watch team interviews and demonstrations.

    - Learn new skills by browsing the learning resources by topic or learning type as well as get easy access to the MSDN library resources you need.

    - Meet your forum moderators and access other developer community resources.

    - Get quick access to news and featured resources and take a peek at what’s coming in Visual Studio 2010!

    Make it your new home today. :-)

    Enjoy,
    -Beth Massi, Visual Studio Community

  • Office Development with Visual Studio

    How to Include .NET Framework 3.5 SP1 with Your Installer (Mary Lee)

    • 17 Comments

    Recently in the Visual Studio Tools for Office forum, a Visual Studio 2008 SP1 developer asked how to include the .NET Framework 3.5 Service Pack 1 in the same directory as the application.  For example, you can select Download prerequisites from the same location as my application in the Prerequisites Dialog Box if your application is going out on CD and being installed without a network connection. 

    However, when you try to build your setup project or ClickOnce installer, you see the following error message: "The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetFX20\netfx20a_x86.msi' in item '.NET Framework 3.5 SP1' can not be located on disk. "

    What does it mean?  The installers for .NET Framework 3.5 SP1 were not included in the VS2008 SP1 installer due to size restrictions. The default deployment experience is to download the .NET Framework 3.5 SP1 from the Microsoft Download Center during installation. 

    How do you include the .NET Framework 3.5 SP1? You can download the full .NET Framework 3.5 SP1 installer and extract the necessary files to the Visual Studio bootstrapper directory. After you modify the product.xml file and update the PublicKey value, the .NET Framework 3.5 SP1 will appear in the Prerequisites Dialog Box. You can find the full instructions in the Visual Studio 2008 Service Pack 1 Readme in section 2.3.1.1 Enable Samesite for the .NET Framework 3.5 SP1 bootstrapper package.

    image

    While these steps may seem lengthy, you only have to complete the steps once on your development computer. Then, every project you develop and deploy can include .NET Framework 3.5 SP1 as a prerequisite.

    If you have further questions about deployment, visit the ClickOnce and Setup & Deployment MSDN forum to search for answers or ask your questions.

    Happy deployment!

    Mary R Lee, programming writer.

  • Office Development with Visual Studio

    DevConnections Conference: VSTO Session Demos (Christin Boyd)

    • 2 Comments

    Hi Folks!  If you're not one of the 4,000 professionals attending DevConnections in Las Vegas, then never fear!  You can see my demos and learn about my session "Office Development with Visual Studio 2008" from this blog entry! 

    VS 2008 lets you target Office 2003 or Office 2007.  We recommend that you only install one version of Office on your development computer.  If you find yourself developing for both versions often, then I suggest creating a dual-boot computer with Office 2003 on one boot, and Office 2007 on the other.  If you develop mostly for one version, and occasionally target the other, then a Virtual PC image would be fine, if you have enough RAM.  I have 2Gig on my laptop, which is not enough for a VPC running Visual Studio.  My desktop computer back in Redmond has 4G, which is plenty.

    FileNewProject

    FAQ: If you choose to ignore my recommendation and have 2 versions of Office on your development computer, then you may have some weirdness when you try to Debug and the debugger loads the wrong versions of some Office DLLs.  If you try to open an Office 2003 project and you keep getting the Upgrade Wizard, and you don't want to, then uncheck the "Always Upgrade" option in the Tools\Options dialog as shown in this funny video and in this photo below:

    image

    Excel And Ribbon Demo

    • Excel and Word templates let you program to the document surface
    • Word Content Controls, Bookmarks
    • Excel cells, Named Ranges, and Charts
    • Your custom Ribbon tabs can scope to just one document
    • Demo code:  http://msdn2.microsoft.com/en-us/library/bb386198.aspx
    • Try clicking on the outermost top edge of the Ribbon Designer and then setting the property "Start from Scratch" = True.   Then add another Tab to the Ribbon Designer and set the ControlId = TabInsert and ControlType = Office and OfficeId = TabInsert as seen below:

    image

     

    VBA interop with VB .NET

    Check out this really nice VBA Interop demo by my Scottish colleague, The Moth

    Databinding

    This part of my demo failed on Tuesday because my security ticket had expired, which made my Windows Authentication login to the database fail.  The problem was that I last received an Active Directory authentication on Friday afternoon when I logged in to my domain in Redmond, Washington.  Then I flew to Vegas and worked on my laptop without logging in to the corporate domain.  By Tuesday afternoon my kerberos ticket had expired, which made my Windows Integrated Security database logins fail.  A failure like that in front of an audience of 100 people is an EPIC FAIL!  Oops.

    In conclusion, I will in the future use SQL Authentication instead of Windows Authentication for demonstrations when I am on-the-road for conferences.

    Developing Outlook Add-Ins

    Deploying Office Solutions

    • Office Security is crucial
    • Office 2003 deployment is different from 2007
    • Office 2003 deployment model in VS 2008 is the same as it was in VSTO 2005
    • Office 2007 solution deployment is completely new technology in VS 2008
      • Leverages ClickOnce Cache
      • ClickOnce Automatic Update and Rollback
      • Prerequisites included in Setup
        (runtime and .NET Framework)
    • Demo steps:  http://msdn2.microsoft.com/en-us/library/bb608592.aspx
    • Lots of session questions were about deployment and you can click on the Tag "Deployment" in this blog to see lots and lots of posts on the topic. 

    Deployment Best Practices

    • Test your deployment on another computer that does NOT have Visual Studio installed
    • I use a test matrix of Virtual PC images on an external hard drive

    Conclusion

    I hope this information is useful as a reference for those who attended my session and for those of you who were unable to attend.   

    -Christin Boyd, Program Manager

  • Office Development with Visual Studio

    New How Do I Video on VSTO Power Tools (Beth Massi)

    • 2 Comments

    They just released a new video on the VSTO Portal and Office Dev Center that I thought I would particularly call out because it works with one of the VSTO Power Tools that the team released in February. In this video Ty Anderson shows how to find an ImageID for Office Ribbon icons using the RibbonID VSTO Power Tool. You can download the VSTO Power Tools here. This video shows how to:

    • Open the RibbonID tool window in Visual Studio
    • Use the tool to browse for available images
    • Search for images
    • Assign an image from the RibbonID tool window as the image for a RibbonButton control

    Watch the video here.

    Enjoy,
    -Beth Massi, Visual Studio Community

  • Office Development with Visual Studio

    PDC Sessions Online (Beth Massi)

    • 4 Comments

    Even if you missed PDC, you can still watch the sessions and comment on the content on http://microsoftpdc.com. Here's a few of the great sessions that were presented that I recommend watching:

    Office Business Applications: Enhanced Deployment

    Under the Hood: Advances in the .NET Type System

    Open XML Format SDK: Developing Open XML Solutions

    Enjoy,
    -Beth Massi, Visual Studio Community

Page 1 of 1 (5 items)