Office as a development platform  with Visual Studio 2008  Daniel Moth Developer and Platform Group Microsoft http://www.danielmoth.com/Blog
AGENDA VSTO Overview Office Ribbon Designer Custom Task Pane Action Pane Outlook Form Region Designer Word Content Controls VBA <-> VSTO interop ClickOnce Deployment
 
Roadmap Custom Document ActionsPane Host Controls on document surface Cached data in the document Server-side data processing Application-level add-ins for Outlook 2007 2003 App-level add-ins for most popular Office apps Runtime support for key Office 2007 UI elements (Custom Taskpane, Ribbon, Outlook form regions) Runtime support enabling Office 2003 doc-level customizations to run in Office 2007 2007 2003 Workflow & Microsoft SharePoint support Office 2007 system-specific features, file format, UI App-level add-ins for more client applications Deeper server-side programming VSTO fully integrated into Visual Studio 2008
VSTO Functionality Over Time Doc-level Outlook add-ins,  VSTA in InfoPath functional extensions infra investments 11 Office add-ins,  infra investments SP Workflow,  new designers,  functional extensions infra investments
Doc-Level Version Resilience v1 solutions use the VSTO v1 runtime v2 solutions use the VSTO v2 runtime v3+ solutions use the VSTO v3+ runtime Reduces the number of runtimes  (improves performance, working set) Eliminates type name clashes in DefaultDomain Based on the Managed Add-in Framework Common VSTO/VSTA runtime
Set the scene inc document level addins
“ Fluent” UI Ribbon,  Custom Task Panes, Actions Pane,  Form Region
Office Ribbon New Look and Feel for Office UI Replaces Command Bars in “the big 5” Office apps Introduces a new extensibility model: RibbonX Enables you to Customize office tabs, Add to built-in tabs Remove tabs, groups and controls Add to Office menu, Override built-in UI Tab Group Control Ribbon
XML-based Customisation Support Ribbon XML structure requires a specific hierarchy <customUI xmlns=&quot;http://schemas.microsoft.com/office/2006/01/customui&quot; onLoad=&quot;OnLoad&quot;> <ribbon> <tabs> <tab idMso=&quot;TabAddIns&quot;> <group id=&quot;MyGroup&quot; label=&quot;My Group&quot;> <toggleButton id=&quot;toggleButton1&quot;  size=&quot;large&quot; label=&quot;My Button&quot; screentip=&quot;My Button Screentip&quot; onAction=&quot;OnToggleButton1&quot;  imageMso=&quot;AccessFormModalDialog&quot; /> </group> </tab> </tabs> </ribbon> </customUI> For example:
Ribbon Customization Office built-in support for XML-based customization model VSTO 2005 SE support Simplifies hookup from .NET via pre-generated classes and sample XML VSTO v3.0 (Visual Studio 2008) support Adds full-blown visual designer support “ Export to XML” option A more robust programming layer inc. events
Ribbon Designer Property Grid Ribbon Control  Toolbox Design Surface
Custom Task & Actions Panes VSTO simplifies and speeds up  task pane UI design process with  visual designers and .NET hookup Actions Pane More robust, easier to program alternative  to Office’s built-in “Smart Document” technology Custom Task Pane The same general idea as Actions Pane, only on the application add-in level, not individual doc
Pane UI Customization
Custom Task Panes and Action Panes
ActionsPane Architecture Document Actions Task Pane WinForms UserControl  (ActionsPane) VSTO Invisible ActiveX Control
Outlook Form Region Features New technology in Outlook 2007 for enhancing and replacing Outlook’s built-in forms Code behind form region is implemented  as COM add-in New controls provide built-in look & feel and data binding to Outlook data
4 Types of Form Regions Adjoining  and  Separate Custom and built-in forms Replacement  and  Replace-all Custom forms only Reading Pane can display all types except  Separate
Adjoining in Reading Pane
Adjoining in Inspector
Separate
Replacement & Replace-All
VS2008 Outlook Form Regions VSTO eases development of Outlook form regions Configure form region with a simple, intuitive wizard Debugging (F5), Intellisense Import  Use wizard to import Outlook-created OFS file Controls are referenced & cast to correct name & type Design Designer supports WPF and Windows Form controls Properties window exposes manifest
Outlook Form Region
Fluent UI
Word Content Controls
Word Content Controls New experience for developing structured documents in Word 2007 New UI for developers to access Word Content Controls Programmable through  Word Object Model Support for XML Mapping
Toolbox Support Word content controls  available in Toolbox  Increases discoverability  of content controls Drag-and-drop experience
Property Grid Support Easily access the properties and events  of the content controls
Programming Paradigm Windows Forms style programming model Generate event handlers Support for IntelliSense
Word Content Controls
Two-Way Simple Data Binding Two methods to data bind Drag and drop support from Data Sources window Set up through the property grid
UI Feature Availability  VSTO 2005 +  VSTO 2005 SE VSTO v3.0 Ribbon (2007 versions of Word, Excel, Outlook and PowerPoint ) Simplified hookup Sample XML Simplified hookup Sample XML Visual designer Richer programming layer Export-to-XML option Actions Pane (document-level projects only) Word 2003 (doc, dot) Excel 2003 (xls, xlt) Word 2003 (doc, dot) Excel 2003 (xls, xlt) Word 2007 (docx/m, dotx/m) Excel 2007 (xlsx/m, xltx/m)  Custom Task Pane (2007 versions of Word, Excel, Outlook, InfoPath and PowerPoint) Simplified hookup Visual designer Simplified hookup Visual designer Outlook Form Region (Outlook 2007 only) Visual designer Configuration wizard Import from existing Word Content Controls Drag n drop controls Simple data-binding Lock controls and content
Where we’ve been, what’s left VSTO Overview Office Ribbon Designer Custom Task Pane Action Pane Outlook Form Region Designer Word Content Controls VBA <-> VSTO interop ClickOnce Deployment
Call VSTO from VBA You enable VBA via COM Interop Interop implemented at design time You can then call VSTO from VBA with IntelliSense after building the project
VBA and VSTO Interop
ClickOnce for Office Add-ins Low-impact deployment mechanism Self-contained Solutions installed per user  Prerequisites are installed if the user is an admin ClickOnce support Full end-to-end solution installation Richer version-independent security model Offline access via the ClickOnce Cache
ClickOnce Deployment
Summary The rationale for the VSTO architecture Bring together Office and .NET Provide a sophisticated developer experience Provide a solid baseline runtime infrastructure Office is a true development platform
MSDN in the UK Visit  http://msdn.co.uk   Newsletter Events Screencasts Blogs
Resources Visit the VSTO Developer Center  http://msdn.microsoft.com/office/tool/vsto/default.aspx   VSTO Help documentation on MSDN http://msdn2.microsoft.com/en-gb/library/d2tx7z6d(vs.90).aspx   VSTO Forum http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16   VSTO Team Blog http://blogs.msdn.com/vsto2
VSTO Design-Time Stack Visual Studio Project Templates IDE Hosting Item Wizards Workflow Document  Solutions Add-ins Ribbons Form Regions SharePoint Excel, Word, Info Path Excel,  InfoPath,  Outlook, PowerPoint, Visio, Word, Project Excel,  Outlook, PowerPoint, Word Outlook Separate IDE Info Path
VSTO/A Runtime Stack VSTO Runtime Office Client Host Managed/ Unmanaged Host Doc Task Pane Host Item Controls Win Forms Controls Doc-Level Solution App-Level Add-in Custom Ribbon Custom Task Pane Custom Form Region App-Level Add-in VSTA Integration Common VSTO/A  Runtime   .NET CLR Managed Add-in Framework (MAF) AppDomain Management Deployment and Updating Security Enforcement Doc-Level Solution ClickOnce
 

Session 2: Office as a development platform with Visual Studio 2008

  • 1.
    Office as adevelopment platform with Visual Studio 2008 Daniel Moth Developer and Platform Group Microsoft http://www.danielmoth.com/Blog
  • 2.
    AGENDA VSTO OverviewOffice Ribbon Designer Custom Task Pane Action Pane Outlook Form Region Designer Word Content Controls VBA <-> VSTO interop ClickOnce Deployment
  • 3.
  • 4.
    Roadmap Custom DocumentActionsPane Host Controls on document surface Cached data in the document Server-side data processing Application-level add-ins for Outlook 2007 2003 App-level add-ins for most popular Office apps Runtime support for key Office 2007 UI elements (Custom Taskpane, Ribbon, Outlook form regions) Runtime support enabling Office 2003 doc-level customizations to run in Office 2007 2007 2003 Workflow & Microsoft SharePoint support Office 2007 system-specific features, file format, UI App-level add-ins for more client applications Deeper server-side programming VSTO fully integrated into Visual Studio 2008
  • 5.
    VSTO Functionality OverTime Doc-level Outlook add-ins, VSTA in InfoPath functional extensions infra investments 11 Office add-ins, infra investments SP Workflow, new designers, functional extensions infra investments
  • 6.
    Doc-Level Version Resiliencev1 solutions use the VSTO v1 runtime v2 solutions use the VSTO v2 runtime v3+ solutions use the VSTO v3+ runtime Reduces the number of runtimes (improves performance, working set) Eliminates type name clashes in DefaultDomain Based on the Managed Add-in Framework Common VSTO/VSTA runtime
  • 7.
    Set the sceneinc document level addins
  • 8.
    “ Fluent” UIRibbon, Custom Task Panes, Actions Pane, Form Region
  • 9.
    Office Ribbon NewLook and Feel for Office UI Replaces Command Bars in “the big 5” Office apps Introduces a new extensibility model: RibbonX Enables you to Customize office tabs, Add to built-in tabs Remove tabs, groups and controls Add to Office menu, Override built-in UI Tab Group Control Ribbon
  • 10.
    XML-based Customisation SupportRibbon XML structure requires a specific hierarchy <customUI xmlns=&quot;http://schemas.microsoft.com/office/2006/01/customui&quot; onLoad=&quot;OnLoad&quot;> <ribbon> <tabs> <tab idMso=&quot;TabAddIns&quot;> <group id=&quot;MyGroup&quot; label=&quot;My Group&quot;> <toggleButton id=&quot;toggleButton1&quot; size=&quot;large&quot; label=&quot;My Button&quot; screentip=&quot;My Button Screentip&quot; onAction=&quot;OnToggleButton1&quot; imageMso=&quot;AccessFormModalDialog&quot; /> </group> </tab> </tabs> </ribbon> </customUI> For example:
  • 11.
    Ribbon Customization Officebuilt-in support for XML-based customization model VSTO 2005 SE support Simplifies hookup from .NET via pre-generated classes and sample XML VSTO v3.0 (Visual Studio 2008) support Adds full-blown visual designer support “ Export to XML” option A more robust programming layer inc. events
  • 12.
    Ribbon Designer PropertyGrid Ribbon Control Toolbox Design Surface
  • 13.
    Custom Task &Actions Panes VSTO simplifies and speeds up task pane UI design process with visual designers and .NET hookup Actions Pane More robust, easier to program alternative to Office’s built-in “Smart Document” technology Custom Task Pane The same general idea as Actions Pane, only on the application add-in level, not individual doc
  • 14.
  • 15.
    Custom Task Panesand Action Panes
  • 16.
    ActionsPane Architecture DocumentActions Task Pane WinForms UserControl (ActionsPane) VSTO Invisible ActiveX Control
  • 17.
    Outlook Form RegionFeatures New technology in Outlook 2007 for enhancing and replacing Outlook’s built-in forms Code behind form region is implemented as COM add-in New controls provide built-in look & feel and data binding to Outlook data
  • 18.
    4 Types ofForm Regions Adjoining and Separate Custom and built-in forms Replacement and Replace-all Custom forms only Reading Pane can display all types except Separate
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
    VS2008 Outlook FormRegions VSTO eases development of Outlook form regions Configure form region with a simple, intuitive wizard Debugging (F5), Intellisense Import Use wizard to import Outlook-created OFS file Controls are referenced & cast to correct name & type Design Designer supports WPF and Windows Form controls Properties window exposes manifest
  • 24.
  • 25.
  • 26.
  • 27.
    Word Content ControlsNew experience for developing structured documents in Word 2007 New UI for developers to access Word Content Controls Programmable through Word Object Model Support for XML Mapping
  • 28.
    Toolbox Support Wordcontent controls available in Toolbox Increases discoverability of content controls Drag-and-drop experience
  • 29.
    Property Grid SupportEasily access the properties and events of the content controls
  • 30.
    Programming Paradigm WindowsForms style programming model Generate event handlers Support for IntelliSense
  • 31.
  • 32.
    Two-Way Simple DataBinding Two methods to data bind Drag and drop support from Data Sources window Set up through the property grid
  • 33.
    UI Feature Availability VSTO 2005 + VSTO 2005 SE VSTO v3.0 Ribbon (2007 versions of Word, Excel, Outlook and PowerPoint ) Simplified hookup Sample XML Simplified hookup Sample XML Visual designer Richer programming layer Export-to-XML option Actions Pane (document-level projects only) Word 2003 (doc, dot) Excel 2003 (xls, xlt) Word 2003 (doc, dot) Excel 2003 (xls, xlt) Word 2007 (docx/m, dotx/m) Excel 2007 (xlsx/m, xltx/m) Custom Task Pane (2007 versions of Word, Excel, Outlook, InfoPath and PowerPoint) Simplified hookup Visual designer Simplified hookup Visual designer Outlook Form Region (Outlook 2007 only) Visual designer Configuration wizard Import from existing Word Content Controls Drag n drop controls Simple data-binding Lock controls and content
  • 34.
    Where we’ve been,what’s left VSTO Overview Office Ribbon Designer Custom Task Pane Action Pane Outlook Form Region Designer Word Content Controls VBA <-> VSTO interop ClickOnce Deployment
  • 35.
    Call VSTO fromVBA You enable VBA via COM Interop Interop implemented at design time You can then call VSTO from VBA with IntelliSense after building the project
  • 36.
    VBA and VSTOInterop
  • 37.
    ClickOnce for OfficeAdd-ins Low-impact deployment mechanism Self-contained Solutions installed per user Prerequisites are installed if the user is an admin ClickOnce support Full end-to-end solution installation Richer version-independent security model Offline access via the ClickOnce Cache
  • 38.
  • 39.
    Summary The rationalefor the VSTO architecture Bring together Office and .NET Provide a sophisticated developer experience Provide a solid baseline runtime infrastructure Office is a true development platform
  • 40.
    MSDN in theUK Visit http://msdn.co.uk Newsletter Events Screencasts Blogs
  • 41.
    Resources Visit theVSTO Developer Center http://msdn.microsoft.com/office/tool/vsto/default.aspx VSTO Help documentation on MSDN http://msdn2.microsoft.com/en-gb/library/d2tx7z6d(vs.90).aspx VSTO Forum http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16 VSTO Team Blog http://blogs.msdn.com/vsto2
  • 42.
    VSTO Design-Time StackVisual Studio Project Templates IDE Hosting Item Wizards Workflow Document Solutions Add-ins Ribbons Form Regions SharePoint Excel, Word, Info Path Excel, InfoPath, Outlook, PowerPoint, Visio, Word, Project Excel, Outlook, PowerPoint, Word Outlook Separate IDE Info Path
  • 43.
    VSTO/A Runtime StackVSTO Runtime Office Client Host Managed/ Unmanaged Host Doc Task Pane Host Item Controls Win Forms Controls Doc-Level Solution App-Level Add-in Custom Ribbon Custom Task Pane Custom Form Region App-Level Add-in VSTA Integration Common VSTO/A Runtime .NET CLR Managed Add-in Framework (MAF) AppDomain Management Deployment and Updating Security Enforcement Doc-Level Solution ClickOnce
  • 44.