DevConnections Conference: VSTO Session Demos (Christin Boyd)

  • Comments 2

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

Leave a Comment
  • Please add 2 and 6 and type the answer here:
  • Post

DevConnections Conference: VSTO Session Demos (Christin Boyd)