• Save
Office 2010 Programming
Upcoming SlideShare
Loading in...5

Office 2010 Programming






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • UDF: User definition functions

Office 2010 Programming Office 2010 Programming Presentation Transcript

  • Programmin gHanoi, 24/05/2010
  • Office 2010Development Tools
  • Visual SharePointStudio DesignerInfoPath Access
  • • Office Customizations • SharePoint Solutions – Rich Deployment – Integrated – C# 4.0 Programming – Extensible
  • • Business Connectivity Services Model Authoring• Workflow Authoring• SharePoint Focused UI• Reusable Content• Export to Visual Studio
  • Simple SharePoint List SharePoint Workflow Custom SharePoint Solutions Applications Applications• Work both online / • Business Connectivity • InfoPath Web Part offline Services • XmlFormView • Sandboxed Solutions
  • DevelopingOffice 2010
  • Client Server• Surfacing • Access document • Automate • Word, Excel, customizations content document Access Services • Modify processes • Workflow document • BI contentUI Object Office Open XMLExtensions model Services
  • Ribbons and Outlook Form Backstage Task PanesContext Menus Regions View
  • File Container Document Open XML SDK 2.0 Properties Comments Content Level Markup Styles Package Level Images, sound, Packaging video Schemas API Embedded code Custom XML
  • Word Excel Access Visio• Conversions • Calculations • Publish to • JavaScript OM• Field Updates • UDFs SharePoint • REST • UI Macros • JavaScript OM • Data Macros • Web Services
  • Business Analyst Professional Developer Power User Visio Visual StudioSharePoint Designer SharePoint
  • Status Chart Web Performance Excel Services BI Search Visio ServicesIndicators Parts Point Services
  • Office 2010UI Customization
  • <customUI ...> <ribbon> ... </ribbon> <contextMenus> <contextMenuidMso=“ContextMenuCell"> <button id="ButtonRefresh” .../> </contextMenu> </contextMenus></customUI>
  • Group Column TabFastCommand
  • <customUI ...> <ribbon> ... </ribbon> <backstage> ... </backstage> <contextMenus> ... </contextMenus></customUI>
  • private void ThisAddIn_Startup (…){ImagePaneip = new ImagePane();Microsoft.Office.Tools.CustomTaskPane pane =this.CustomTaskPanes.Add(ip, "Images");pane.Visible = true;}
  • Office 2010Client Workflow
  • • SharePoint Designer or Visual Studio 2010 – SPD targeted to Power Users – Visual Studio targeted to Developers – Integration allows users to work together SharePoint Designer Visual Studio 2010 2010
  • • Each tool plays a specific role – Visio allows business analyst to define process – SPD allows power users to implement process• Round Trip Import/Export Visio 2010 SharePoint Designer 2010
  • • Special SharePoint Workflow Template – Contains shapes for conditions and actions – Allows exporting of process to SPD
  • • New workflows are attached to a container – List Workflows are attached to a specific list – Reusable Workflows are not attached to a list • May be constrained to a content type • Attached later using browser – Site Workflows are attached to the current site
  • • SharePoint 2010 Project Types for Workflow – Import Reusable Workflow – Sequential Workflow – State Machine Workflow
  • BusinessConnectivity Services
  • Office Client SharePoint Server 2010 External Business Parts SharePoint Site Custom Code VSTO External Custom Code Package List Office Integration Search, Workflow, Web PartsBusiness Connectivity Services Secure Store Service (SSS) Business Connectivity Services Client Runtime Cache External Content Types Server (ECT) Runtime SQL WCF Custom .NET Connector External Data
  • Describes the schema and data access capabilities of an externalOffice Clients (Rich) data source and its behavior within Office and SharePoint BCS *formerly known as BDC Entity External Data External Source Content Type (Web Service, DB, .Net (ECT) object, LOB system, Web 2.0 service, etc.) BCS BCS-enabled solutions rely on ECTs to integrate external data into SharePoint SharePoint (Thin) and the Office client applications
  • Advanced Simple SharePoint Designer Power User / No code RAD Dev Advanced Dev Custom Code• OOB UX on thin and rich clients • Custom UX and data integration on (Outlook and Groove) based on thin and rich clients (apps that External Lists support VS Office add-ins) • Custom Forms in SharePoint and • Through Office, SharePoint and BCS Groove Object Models• Connect to existing back-end • Custom back-end connectivity integration services or simple through .Net objects databases • Complex BDC models (many • Simple BDC Models (few ECTs, simple ECTs, complex associations) associations)• Transparent packaging (managed by • Explicit packaging (managed by dev) BCS)
  • Office 2010Open XML
  • • System.IO.PackagingAPIs • • • Open XML SDK PHPExcel Open XML 4J • File Format ConvertersTools • Open XML SDK • Open XML Power Tools • Package Explorer • Content Control Toolkit
  • string relationshipType = "http://schemas.openxmlformats.org/...";using (Package package = Package.Open("mydocument.docx")){PackageRelationship relationship = null;foreach (PackageRelationshipsearchRelation inpackage.GetRelationshipsByType(relationshipType)) { relationship = searchRelation; break; } Uri partUri = PackUriHelper.ResolvePartUri(relationship.SourceUri, relationship.TargetUri);PackagePartmainPart = package.GetPart(partUri); // Do something with mainPart}
  • using (WordprocessingDocument document =WordprocessingDocument.Open(“mydocument.docx”)){MainDocumentPartmainPart = document.MainPart; // Do something with mainPart}
  • Office 2010Services
  • Open XML SDK Word ServicesEditing document Rendering content document content
  • string serviceAppName = "Word Conversion Service Application";ConversionJobSettings settings = new ConversionJobSettings(){OutputFormat = SaveFormat.XPS};ConversionJob job = new ConversionJob(serviceAppName, settings);job.AddFile("http://contoso.com/documents/source.docx", "http://contoso.com/documents/destination.xps");job.Start(); // starts asynchronous AddFile AddFolder AddList• String • SPFolder • SPList• String • SPFolder • SPList • Recurse • Recurse
  • • JavaScript Object model• REST API• Chart Web Part data provider• Visio data provider
  • • Integrate with Excel Web Access• Read / write depending on EWA var ewa; function initialize() { ewa = new Ewa.EwaControl("ewa"); ewa.openWorkbookAsync("http://server/mywb.xlsx", Ewa.SessionMode.View, "salesreps", onWorkbookLoaded); } function onWorkbookLoaded(result) { if (!result.succeeded) { alert("Error"); return; } // hook up to events that were interested in workbook = ewa.get_activeWorkbook(); ... }
  • • Read Access to Excel datahttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/modelhttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/model/Rangeshttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/model/Chartshttp://example.com/_vti_bin/ExcelRest.aspx/library/sales.xlsx/model/Charts(Chart 1)• Set values on named ranges• Expose data as – ATOM – HTML – Image
  • • Access Databases Published to SharePoint – Not just saving an .accdb to a document library• Translation to SharePoint technologies – Tables  Lists – Queries, Reports, Forms  Web equivalent• Synchronized changes between rich client and SharePoint
  • InfoPath 2010Form Services
  • • Build powerful enterprise applications quickly and easily on SharePoint
  • • InfoPath 2010 provides design services• Layout – Themes – Table Layout• Behavior – Rules – Custom Code• Data – Binding – External Data
  • • Renders InfoPath forms in the browser – Better performance in SharePoint 2010 – Managed via Central Admin or PowerShell – Accessibility - WCAG 2.0 AA – XHTML 1.0 and strict CSS
  • • InfoPath is a tool for creating rich web parts – Exposes or receives data via connections – Ex. Host submission form on main portal page
  • • Accessible with a single click in SharePoint
  • • Performed from within InfoPath – Accessed in Backstage
  • InfoPath Form Form CustomDefinitio Code n Visual Studio Tools for Applications