Your SlideShare is downloading. ×
0
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Vsto 3 Excel Add-in SNUG
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Vsto 3 Excel Add-in SNUG

1,677

Published on

Presentation made on my local Sydney .Net user group

Presentation made on my local Sydney .Net user group

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,677
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Alternative to build the setup program yourself: Add-in Express 2009 for Microsoft Office and VSTO (commercial product) www.add-in-express.com
  • Transcript

    • 1. VSTO 3.0 Programming and Deploying an Excel Add-In
      • Miguel Santos
      • Sr. Software Developer
      • Nielsen
      • Email: [email_address]
    • 2. Agenda
      • Define VSTO and Add-In
      • Create, Build and Deploy Excel Add-In on Visual Studio Tools for Microsoft Office System (VSTO) 3.0 / Visual Studio .NET 2008 SP1
      • Deployment & Security
      • Troubleshooting Deployment
      • Demos
    • 3. Assumptions
      • Excel 2007
      • VS 2008 setup project
      • Excel automation
    • 4. VSTO Definition
      • Microsoft’s strategic tool for developing Office solutions.
      • It helps building applications that run on MS Office.
      • VSTO solutions are secure and easy to deploy
        • Based on .NET Code Access Security
        • Offers ClickOnce deployment model as one of the development options
    • 5. VSTO Definition (cont)
      • VSTO makes Office development available to .NET developers
        • Provides all the productivity of Visual Studio IDE
        • Provides all the power of the .NET Framework.
        • Leverages the skills of .NET developers
    • 6. VSTO History
      • Before VSTO (VBA and COM automation using C++ and VB6)
      • VSTO 2003. Target: Office 2003
      • VSTO 2005. Target: Office 2003(Outlook)
      • VSTO 2005 Second Edition. Target: Office 2003/2007
    • 7. VSTO History (cont)
      • VSTO 3.0. Target: Office 2003/2007. Integrated to VS2008.
      • VSTO 2010 (v4 – April 2010). Target: Office 2003/2007/2010
    • 8. VSTO 3 Programming New features
      • Visual designer for Ribbons
      • Excel, Word 2007 document support.
      • Task panes
      • Smart tags
      • Rich user interface controls
    • 9. VSTO 3 Deployment New features
      • NET Framework 3.5/SP1 client profile
      • Click Once
      • Office 2007 System as prerequisites
      • VSTO Power Tools
    • 10. VSTO Add-In
      • Application-level solution resides in the program itself.
      • Class-library project associated with a supported Office application
      • Library assembly runs as an add-in within the host application's domain
    • 11. VSTO Add-In (cont)
      • It supports Office 2003: Excel, Word, Outlook, Powerpoint, Project, Visio
      • It supports Office 2007: Excel, Word, Outlook, InfoPath, Powerpoint, Project, Visio
    • 12. Excel Add-In
      • Application add-in resides in Excel in an AppDomain.
      • VSTO creates the class library project.
      • It defines main object: ThisAddIn.
      • It creates two methods: Startup, Shutdown.
      • It adds required Excel/VSTO references.
    • 13. Excel Add-In
      • Demo Hello World
    • 14. Excel Object Model
      • Excel PIA are managed assemblies that wrap the Office COM-based interfaces for use within .NET development
      • Key objects are:
          • Application
          • Workbook
          • Worksheet
          • Range
    • 15. Application
      • It represents the Excel application itself.
      • Properties: ActiveWorkbook, ActiveSheet, ActiveCell, Workbooks
      • Methods: Quit, Run, Save
      • Code: Globals.ThisAddIn.Application
    • 16. Workbook
      • It represents an Excel workbook.
      • Properties: ActiveSheet, Name, Sheets, Worksheets, Visible
      • Methods: SaveAs
      • Events: WindowActivate, BeforeClose
      • Code: Application.ActiveWorkBook
    • 17. Worksheet
      • It represents an Excel worksheet.
      • Properties: Cells, ActiveCell, Name, Visible
      • Methods: Copy, Select, SaveAs
      • Events: SelectionChange
      • Code: (Excel.Worksheet) Application.ActiveSheet
    • 18. Range
      • It represents an Excel range.
      • Properties: Borders, Cells, Name, Value2
      • Methods: Activate, Clear, Copy, Select
      • Code: Application.ActiveCell, Application.Cells
    • 19. Ribbon
      • New way to implement menu items in Office (Replaces menu and toolbar)
      • It contains tabs that hold all required commands/window controls.
      • Add ribbon to add-in project.
      • Options: Visual designer or Xml
      • Available windows controls are button, combo box, checkbox, etc.
    • 20. Excel Add-In
      • Demo Common Tasks
    • 21. Deployment Overview
      • Options:
        • ClickOnce
        • MSI/Setup.exe
        • Document Deployment with WSS/MOSS
    • 22. Deployment Steps
      • Check/Install prerequisites
      • Deploy Add-In (HKCU)
      • Update registry and
      • Set up security (Full trust)
    • 23. Deployment Windows Installer
      • Custom branding installation
      • Can deploy additional assemblies/components and registry settings.
      • Can allow custom configuration via user interaction
      • More developer effort
      • No automatic updates
    • 24. Windows Installer Prerequisites
      • Windows Installer 3.1
      • NET Framework 3.5/SP1
      • VSTO Runtime SP1
      • Office 2007 PIA
    • 25. Create Windows Installer
      • Prepare development PC. (VS 2008 SP1, .NET 3.5SP1)
      • Create Add-In and basic installer project.
      • Add Add-in project as project output group.
      • Add deployment and application manifests.
      • Configure prerequisites
      • Add registry settings
    • 26. Create Windows Installer (cont)
      • Configure launch conditions
        • VSTO run time
        • Office Shared PIA
        • Excel PIA
      • Configure a single-user installation
      • Build MSI/Setup.exe.
    • 27. Create Windows Installer (Optional)
      • Bootstrap component check setup. (Office 2003 PIA)
      • Language pack.
      • More assembly/components
      • Click once cache deployment
      • All users deployment – See Misha’s blog
      • Vista deployment- check UAC compliant box
    • 28. Deployment Windows Installer
      • Demo Excel Add-In msi.
    • 29. Troubleshooting
      • VSTO Troubleshooter
      • Windows Event log contains Deployment and installation error messages
    • 30. Summary
      • VSTO is a set of Visual Studio project templates and runtimes for building add-ins for Microsoft Office solutions.
      • Introduction to Excel's main objects and how to perform common tasks using VSTO
      • Deployment using Windows Installer has been simplified but it is still a complex task.
    • 31. Resources
      • MSDN
        • Excel Object Model Overview
        • Deploying Office Solutions
        • Security in Office Solutions
        • Deploying a VSTO 3.0 Solution Using Windows Installer
          • (Part 1 of 2)
          • (Part 2 of 2)
    • 32. Resources (Cont)
      • Blogs
        • VSTO Team
        • Andrew Coates
        • Andrew Whitechappel
        • Misha Shneerson
          • Deploying your VSTO 2008 Add-In to All Users Part I , Part II , Part III
    • 33. VSTO 2010 improvements
      • C# support for optional parameters.
      • Click once:
        • Setup can target multiple Office application.
        • Post deployment custom actions. (e.g. moving files to user directories, deleting files during uninstall , registry )
        • No-PIA installs. ( PIA is part of the .NET framework)
    • 34. Thank you
      • Q & A

    ×