Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Visual Studio Tools für Office 2007 Next Generation Applications for Office - Teil 2 Marcel Gnoth, Avanade Deutschland GmbH CS3, VB7, OF2, PA12.

Ähnliche Präsentationen


Präsentation zum Thema: "Visual Studio Tools für Office 2007 Next Generation Applications for Office - Teil 2 Marcel Gnoth, Avanade Deutschland GmbH CS3, VB7, OF2, PA12."—  Präsentation transkript:

1 Visual Studio Tools für Office 2007 Next Generation Applications for Office - Teil 2 Marcel Gnoth, Avanade Deutschland GmbH CS3, VB7, OF2, PA12

2 Marcel Gnoth, www.gnoth.net, © 2006 1 Zur Person Dipl. Inf. Marcel Gnoth, MCSD Senior Consultant, Avanade Deutschland GmbH Office Business Application Group & Business Intelligence marcel@gnoth.net, www.gnoth.net (Code+Folien)marcel@gnoth.netwww.gnoth.net Autor dotnetpro, dotnet-magazin, Developerworld, MSDN Sprecher BASTA!, TechTalk, SQL Server Days, NRW06 Themen Verteilte nachrichtenbasierte Informationssysteme MS Message Queueing, SQL Server Service Broker Office System 2003 / 2007 Integration BI, ETL, Reporting VB6, COM, SQL Server,.Net

3 Marcel Gnoth, www.gnoth.net, © 2006 2 Über Avanade Gegründet als Joint Venture von Accenture und Microsoft im April 2000 Focus auf MS Technologien Anbindung an SAP und andere Systeme Ein führender Technologie-Integrator mit über 4.000 Mitarbeitern in 21 Ländern Unternehmenslösungen auf Basis von Microsoft- Technologien über 3.000 Projekte bei rund 1.900 Kunden weltweit

4 Marcel Gnoth, www.gnoth.net, © 2006 3 3-fach stark Umfassende Anwendungsentwicklung, Infrastrukturlösungen und Integration modernster Technologien Flexible und innovative Software Fundierte Industrie- erfahrung und Unter- nehmenslösungen Im Team bieten wir unseren Kunden passende Unternehmenslösungen an

5 Marcel Gnoth, www.gnoth.net, © 2006 4 Globale Präsenz Avanade wächst stetig und zählt im Februar 2006 mehr als 4.000 Mitarbeiter in 21 Ländern, sowie über 3.000 Projekte bei rund 1.900 Kunden. Avanade Americas Seattle San Francisco Chicago Dallas Boston New York Toronto St. Louis Nashville Kansas City Cincinnati Avanade Europe Almere Barcelona Brussels Copenhagen Edinburgh Helsinki Kronberg London Málaga Madrid Milan Oslo Paris Rome Stockholm Zurich Avanade Australia Sydney Melbourne Brisbane Canberra Avanade Asia Singapore Kuala Lumpur Bangkok Tokyo Avanade India Mumbai Bangalore Hyderabad Avanade Philippines Manila

6 Marcel Gnoth, www.gnoth.net, © 2006 5 Unsere Kunden (Europa, Auszug)

7 Marcel Gnoth, www.gnoth.net, © 2006 6 Agenda – Was gibt es neues Überblick Microsoft Office Open XML Formats (Office XML Formats) Word, Excel, PowerPoint Vortrag von Jens Häupel, OFF 4 Content Controls und XML – Mapping Taskpanes auf Applikation Ebene Ribbon - User Interface Word, Excel, PowerPoint Vortrag von Jens Häupel, OFF

8 Marcel Gnoth, www.gnoth.net, © 2006 7 VSTO – Zwischenrelease Office 2007 + Visual Studio 2005 VSTO 2005 Cypress Visual Studio 2005 Tools for Office Second Edition (VSTO 2005 SE) http://msdn.microsoft.com/office/tool/vsto/2005SE/ default.aspxhttp://msdn.microsoft.com/office/tool/vsto/2005SE/ default.aspx Beta Office 2007 + VSTO V3 Nächste Visual Studio Version (Orcas)

9 Task Panes & Actions Panes Applikationsbezogenes UI

10 Marcel Gnoth, www.gnoth.net, © 2006 9 Taskpanes Windows Froms Userinterface Integriert in Office Office 2003: Auf Dokumentebene Dokument Aktionen Office 2007 Auch auf Applikationsebene Aufgabenbereich

11 Marcel Gnoth, www.gnoth.net, © 2006 10 Dokument Aktionen Taskpane ist mit dem geladenen Dokument verbunden Auch Actions Pane genannt ISmartDocument Technologie Im Dokument ist ein Verweis Assembly gespeichert Runtime Storage Control Application Manifest Assembly wird geladen

12 Marcel Gnoth, www.gnoth.net, © 2006 11 Custom TaskPanes Neues ICustomTaskPaneConsumer Interface Neues Projekt: AddIn

13 Marcel Gnoth, www.gnoth.net, © 2006 12 Custom TaskPanes Dll Projekt UserControl hinzufügen Excel startet beim Debuggen Neue Taskpane mit UserControl erstellen Private Sub ThisApplication_Startup(…) Handles Me.Startup Dim ctp As Microsoft.Office.Tools.CustomTaskPane = Nothing ctp = CustomTaskPanes.Add(New ucExcel(), "Moin") ctp.Visible = True End Sub

14 Marcel Gnoth, www.gnoth.net, © 2006 13 Custom TaskPanes Zugriff auf Excel Objekte Globals.ThisApplication Dim s As Excel.Worksheet = _ CType(Globals.ThisApplication.ActiveSheet, _ Excel.Worksheet) s.Cells(3, 6) = "Hallo, Moin: " & Now

15 Marcel Gnoth, www.gnoth.net, © 2006 14 Stacking und Order Mehrere TaskPanes (AddIn) erscheinen nebeneinander Stellen je ein UserControl dar ActionsPane (Doc) erscheint neben TaskPane (AddIn) ActionsPane (Doc) erscheint nur einmal und stellt mehrere UserControls dar Stacking Order und Layout

16 Demo ActionsPane

17 Content Controls & XML Mapping Trennung von XML – Daten und Dokument Content Controls XML Mapping

18 Marcel Gnoth, www.gnoth.net, © 2006 17 Content Controls Neu in Word 2007 Vordefinierte Platzhalter, die der Anwender ausfüllen soll Verschiedene Typen, wie Textbox, drop-down oder Calender Können XML Daten zugeordnet werden Können gegen löschen gesperrt werden Trennung von Dokument und Formulardaten

19 Marcel Gnoth, www.gnoth.net, © 2006 18 Content Control Bei MausOver erscheint es Ber MouseExit verschwindet es

20 Marcel Gnoth, www.gnoth.net, © 2006 19 Content Controls Hinzufügen durch UI (Tab Entwickler Tools)

21 Marcel Gnoth, www.gnoth.net, © 2006 20 Neue Klassen in Office Listen ContentControls Document Range Selection objects ContentControlEntries wdContentControlComboBox wdContentControlDropDownList

22 Marcel Gnoth, www.gnoth.net, © 2006 21 Neue Klassen in Office ContentControl wdContentControlDate wdContentControlText wdContentControlRichText wdContentControlBlockPicture wdContentControlComboBox wdContentControlDropDownList wdContentControlBuildingBlockGallery ContentControlEntry XMLMapping

23 Marcel Gnoth, www.gnoth.net, © 2006 22 Content Control – Code Titel wird dem Anwender als Hilfe angezeigt Über den Titel oder den Index kann ein Content-Control referenziert werden Dim oCC As Word.ContentControl Set oCC = Application.Selection.ContentControls.Add _ (wdContentControlText) oCC.Title = "MyTitle" oCC.SetPlaceholderText,,"Type text here" oCC.LockContentControl = True oCC.LockContents = True ActiveDocument.ContentControls.Item("MyTitle").Delete ActiveDocument.ContentControls.Item(1).Delete Dim oCC As Word.ContentControl Set oCC = Application.Selection.ContentControls.Add _ (wdContentControlText) oCC.Title = "MyTitle" oCC.SetPlaceholderText,,"Type text here" oCC.LockContentControl = True oCC.LockContents = True ActiveDocument.ContentControls.Item("MyTitle").Delete ActiveDocument.ContentControls.Item(1).Delete

24 Marcel Gnoth, www.gnoth.net, © 2006 23 XML Mapping Trennung der XML-Daten von Dokument- Formatierung und Layout. Data / View Verbindet Dokument mit einer XML Datei Office XML Format speichert Custom XML Daten in Document Parts Dokumente können mehrere Custom Data Stores enthalten

25 Marcel Gnoth, www.gnoth.net, © 2006 24 XML Mapping XML-Mapping zwischen Content Controls und Custom Data Store Über XPath Definitionen Dokument kann gefüllt werden über eine XML Datei Über das Objekt Modell können Custom DataStores hinzugefügt und zugeordnet werden

26 Marcel Gnoth, www.gnoth.net, © 2006 25 Weitere neue Klassen in Office 2007 CustomXMLNamespaceManager Zuordnung zwischen Namespaces und Prefixes CustomXMLSchemaCollection Schemata für Custom XML Parts CustomXMLSchema Ein Schema CustomXMLParts Collection der Custom XML Parts Auch DataStore des Dokumentes

27 Marcel Gnoth, www.gnoth.net, © 2006 26 Weitere neue Klassen in Office 2007 CustomXMLPart Ein Custom XML Part des DataStore CustomXMLNodes Menge der CustomXMLNode-Objekte des aktuellen Dokumentes CustomXMLNode Neue msoXMLDataNodeType Enumeration msoXMLNodeAttribute msoXMLNodeCData msoXMLNodeComment msoXMLNodeDocument msoXMLNodeElement msoXMLNodeProcessingInstruction msoXMLNodeText

28 Marcel Gnoth, www.gnoth.net, © 2006 27 Custom XML Part hinzufügen Part hinzufügen XML aus Datei laden Jedes Part wird in separater Datei abgelegt Ordern: /customXml/item1.xml Dim oCustomXMLPart As Office.CustomXMLPart Dim strXMLPartName As String strXMLPartName = "c:\myDataStoreFiles\myXMLDataStore.xml" ' First, add a new custom XML part to the document Set oCustomXMLPart = ActiveDocument.CustomXMLParts.Add ' Second, load the XML file into the custom XML part Call oCustomXMLPart.Load(strXMLPartName) Dim oCustomXMLPart As Office.CustomXMLPart Dim strXMLPartName As String strXMLPartName = "c:\myDataStoreFiles\myXMLDataStore.xml" ' First, add a new custom XML part to the document Set oCustomXMLPart = ActiveDocument.CustomXMLParts.Add ' Second, load the XML file into the custom XML part Call oCustomXMLPart.Load(strXMLPartName)

29 Marcel Gnoth, www.gnoth.net, © 2006 28 XML mit Content Controls verbinden String mit XPath dem ContentControl Object zuweisen SetMapping Methode ' First, create the XPath Dim strXPath As String strXPath = "/s:book/s:AuthorFirstName ' Next, create an instance of a content control to work with Dim oContentControl As Word.ContentControl Set oContentControl = Application.Selection.ContentControls.Add _ (wdContentcontrolComboBox) ' Last, map the data using the XPath oContentControl.XMLMapping.SetMapping strXPath ' First, create the XPath Dim strXPath As String strXPath = "/s:book/s:AuthorFirstName ' Next, create an instance of a content control to work with Dim oContentControl As Word.ContentControl Set oContentControl = Application.Selection.ContentControls.Add _ (wdContentcontrolComboBox) ' Last, map the data using the XPath oContentControl.XMLMapping.SetMapping strXPath

30 Demo Content Controls

31 Open XML File Format Office Dokumente als Zip-Archive

32 Marcel Gnoth, www.gnoth.net, © 2006 31 Office Open XML Format Open Packaging Conventions System.IO.Packaging

33 Marcel Gnoth, www.gnoth.net, © 2006 32 System.IO.Packaging WinFX /.Net 3 Referenz auf C:\WINDOWS\assembly\GAC_MSIL\WindowsBase\3.0.51116.0__31bf3856ad364e35\WindowsBase.dll Imports System.IO.Packaging Private wdPackage As Package Private corePropertiesPart As PackagePart wdPackage = Package.Open( _ docName, FileMode.Open, FileAccess.ReadWrite) corePropertiesPart = wdPackage.GetPart(corePropertiesUri) Imports System.IO.Packaging Private wdPackage As Package Private corePropertiesPart As PackagePart wdPackage = Package.Open( _ docName, FileMode.Open, FileAccess.ReadWrite) corePropertiesPart = wdPackage.GetPart(corePropertiesUri)

34 Marcel Gnoth, www.gnoth.net, © 2006 33 Ändern / Erstellen der Dokumente Zugriff nur auf das XML in den Zip- Dokumenten Kein Office erforderlich Serververarbeitung

35 Demo Eigenschaften Eines Dokumentes ändern

36 Marcel Gnoth, www.gnoth.net, © 2006 35 Alles wird gut Uff...

37 Marcel Gnoth, www.gnoth.net, © 2006 36 Dokument Inspektoren Nach Fertigstellung des Dokumentes Prüfen auf persönliche Infos Überarbeitet Texte und Kommentare anderes Eigene entwickeln Zum Beispiel Prüfen auf Worte und Redewendungen, die nicht verwendet werden sollen http://msdn2.microsoft.com/en- us/library/aa338203.aspxhttp://msdn2.microsoft.com/en- us/library/aa338203.aspx

38 Marcel Gnoth, www.gnoth.net, © 2006 37 Links What's New for Developers in Word 2007 http://msdn2.microsoft.com/en-us/library/ms406055.aspx Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats http://www.microsoft.com/office/preview/beta/converter.mspx Custom Task Panes: Doc-Level and App-Level http://blogs.msdn.com/andreww/archive/2006/07/31/684595.aspx What's New for Developers in Word 2007 http://msdn2.microsoft.com/en-us/library/ms406055.aspx Introducing the Microsoft Office (2007) Open XML File Formats http://msdn2.microsoft.com/en-us/library/aa338205.aspx http://msdn2.microsoft.com/en-us/library/ms771890.aspx Creating Word 2007 Templates Programmatically http://msdn2.microsoft.com/en-us/library/ms406053.aspx


Herunterladen ppt "Visual Studio Tools für Office 2007 Next Generation Applications for Office - Teil 2 Marcel Gnoth, Avanade Deutschland GmbH CS3, VB7, OF2, PA12."

Ähnliche Präsentationen


Google-Anzeigen