130 likes | 222 Views
SharePoint and Open XML. Presented by Becky Bertram MCSD, MCAD, MCTS www.beckybertram.com. Using SharePoint as a Data Source for your custom Open XML Documents. What is Open XML?. New format for Microsoft Office 2007 documents that can be opened as a ZIP file.
E N D
SharePoint and Open XML Presented by Becky Bertram MCSD, MCAD, MCTS www.beckybertram.com Using SharePoint as a Data Source for your custom Open XML Documents
What is Open XML? • New format for Microsoft Office 2007 documents that can be opened as a ZIP file. • Allows document properties to be stored separately from the information in the document itself. • Document contents themselves are stored as XML.
Parts • Provide modularity so you can easily swap out portions of the document without affecting the document as a whole. • Some “parts” are common across all Office documents; others are unique to a particular application. • These XML parts are referenced through “relationship” files (much like a foreign key in a database.)
Office UI Elements • Ribbon • Tab • Add-Ins Tab
Office UI Elements • Actions Pane
Scenario • A college professor submits an InfoPath Form with information regarding next semester’s course. • Someone from the registrar’s office approves the information submitted. • The person in charge of creating the course catalog for the semester wants to dynamically generate a Word document based on the information stored in the Form Library.
VSTO Visual Studio Tools for Office • Included with Visual Studio 2008 • VSTO Developer Center on MSDN:http://msdn.microsoft.com/en-us/vsto/default.aspx • Office Developer Center on MSDN:http://msdn.microsoft.com/en-us/office/default.aspx
SharePoint Web Services Referenced in the IIS Web Application of your SharePoint site, in the _vti_bin folder.
Lists Web Service • Used for carrying out actions on lists. • Could call Lists.GetListItems() Web Method. • Fields are returned using more of the Search Column nomenclature (i.e. ows_ColumnName). • http://msdn.microsoft.com/en-us/library/lists.aspx
List Data Retrieval Web Service • Based on Data/Adapter methodology of ADO.NET, Data Controls, etc. • Returns columns as XML elements, where each element is the name of the column. • http://msdn.microsoft.com/en-us/library/ms774413.aspx • http://msdn.microsoft.com/en-us/library/dd586758.aspx
List Data Retrieval Web ServiceParameters • View Fields: CAML representation of <ViewFields> to be returned • Query: CAML Query (such as <Where>) • QueryOptions: Options such as which record do you want to start with; do you want the results to be returned as elements or attributes; etc.
Things to Keep in Mind • Unlike coding SharePoint Features and Solutions that will be deployed right onto a SharePoint server, you’ll need to connect to SharePoint using a Web Service since the user will be access SharePoint from a client machine. • Pass in the proper credentials to ensure they’ve got the permissions for the SharePoint resource they’re accessing.
Access and Mail Merge • Create an Access project that references SharePoint lists • Create a new Word document and start the Mail Merge process with Access as the data source. • Reference columns from that SharePoint list in your Word document.