ILUG 2007 - Notes and Office Integration


Published on

The Magic of Integration and the revealing of what's behind the curtain : Microsoft Office and IBM Lotus Notes and Domino integration. Microsoft Office 2007 and Lotus Notes 8 will bring a new level of integration possibilities to the Lotus Notes and Domino world. This session will look at the new functionality in Office 2007, such as the Office Ribbon and OpenXML file formats. We will discuss the impact on Mail Merge, data transfer, and how this will impact your applications and development.

We will also look at the updated Visual Studio Tools for Office 2007. This session will also look at Lotus Notes 8 and it's impact on integration. The session starts at the beginning ... and then dives deep into the integration possiblities.

While this sesison is mostly about the code that makes it work, users and managers will get detailed sample applications to take home and put to use immediately! In the end, this session will help you add value to your applications not possible without the magic of integration. Presented by Rocky Oliver for John Head

Published in: Business, Technology
1 Comment
  • outstanding demonstration..convinced me to have a hardlook at my business model..brilliant
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • ILUG 2007 - Notes and Office Integration

    1. 1. The Magic of Integration and the revealing of what's behind the curtain : Microsoft Office and IBM Lotus Notes and Domino integration John D. Head PSC Group, LLC
    2. 2. Before we begin … <ul><li>Please turn off/set to vibrate/mute all Cell Phones Pagers Computers Please remember to fill out your evaluations </li></ul>
    3. 3. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    4. 4. Who is John D. Head? <ul><li>Framework Manager at PSC Group, LLC </li></ul><ul><li>Involved in Lotus technology since 1993 </li></ul><ul><li>Speaker for over 25 sessions at Lotusphere since 1996 </li></ul><ul><li>Speaker at Advisor and Lotus Developer conferences </li></ul><ul><li>IBM Lotus Notes/Domino Certified </li></ul><ul><li>Author for Advisor Magazine and other publications on Office and SmartSuite integration with Notes </li></ul><ul><li> contributing Author and Forum moderator </li></ul><ul><li>Blog with articles </li></ul><ul><ul><li> </li></ul></ul>
    5. 5. PSC Group, LLC <ul><li>IBM Premium Business Partner for 15+ Years </li></ul><ul><li>Microsoft Gold Partner </li></ul><ul><li>Winner 2007 Lotus Award </li></ul><ul><li>Winner 2007 IBM Beacon Award </li></ul><ul><li>Notes 8 Design Partner </li></ul><ul><li>Host of </li></ul><ul><li>Host of the following blogs: </li></ul><ul><ul><li>Mike Rhodin – Lotus GM ( </li></ul></ul><ul><ul><li>Ed Brill’s ( ) </li></ul></ul><ul><ul><li>Alan Lepofsky’s Notes Tip’s ( ) </li></ul></ul><ul><ul><li>Alan Gartenberg - Sametime ( ) </li></ul></ul><ul><ul><li>Jeff Eisen – Hannover ( ) </li></ul></ul><ul><ul><li>Domino Server Team ( ) </li></ul></ul><ul><ul><li>Chris Pepin – IBM CTO’s Office ( </li></ul></ul>
    6. 6. A Quick Poll <ul><li>Who is using … </li></ul><ul><ul><li>Office 97 and earlier </li></ul></ul><ul><ul><li>Office 2000 </li></ul></ul><ul><ul><li>Office XP </li></ul></ul><ul><ul><li>Office 2003 </li></ul></ul><ul><ul><li>Office 2007 </li></ul></ul><ul><ul><li> or StarOffice </li></ul></ul><ul><ul><li>Office for the Mac </li></ul></ul><ul><ul><li>Microsoft Works </li></ul></ul><ul><ul><li>iWork or AppleWorks </li></ul></ul><ul><ul><li>SmartSuite </li></ul></ul><ul><ul><li>Other </li></ul></ul>
    7. 7. The Demo Databases <ul><li>Session example database </li></ul><ul><ul><li>Single database with all examples </li></ul></ul><ul><ul><li>You can configure it for your Notes client </li></ul></ul><ul><ul><li>Example numbers in the presentation match those in the database </li></ul></ul><ul><li>Lotusphere 2007 session database </li></ul><ul><ul><li>Included on the conference CD </li></ul></ul><ul><ul><li>Updated download available </li></ul></ul><ul><ul><li>Includes design elements for this session </li></ul></ul><ul><li>Personal name and address book </li></ul><ul><ul><li>My demos work with the standard Notes 6, 7 and 8 templates </li></ul></ul>
    8. 8. Integration History <ul><li>1994 </li></ul><ul><ul><li>DDE with Ami Pro </li></ul></ul><ul><li>1996 </li></ul><ul><ul><li>Notes R4 </li></ul></ul><ul><ul><li>OLE </li></ul></ul><ul><ul><li>LotusScript </li></ul></ul><ul><ul><li>VBA </li></ul></ul><ul><li>1997 </li></ul><ul><ul><li>SmartSuite with LotusScript (Word Pro) </li></ul></ul><ul><li>1998 </li></ul><ul><ul><li>Notes R5 with COM support </li></ul></ul><ul><li>2001 </li></ul><ul><ul><li>Notes Domino 6 </li></ul></ul><ul><li>2004 </li></ul><ul><ul><li>Notes Domino 6.5 with LS2J and DXL </li></ul></ul><ul><li>2005 </li></ul><ul><ul><li>Notes Domino 7 with web services </li></ul></ul><ul><li>2007 </li></ul><ul><ul><li>2007 Office System </li></ul></ul><ul><ul><li>Lotus Notes/Domino 8 </li></ul></ul>
    9. 9. The Good News <ul><li>We are at the end of the Renaissance of the Integration Era </li></ul><ul><li>In the “Medieval Times” </li></ul><ul><ul><li>DDE with Ami Pro </li></ul></ul><ul><ul><li>NotesSQL was used to get even the basic of data </li></ul></ul><ul><ul><li>OLE embedding </li></ul></ul><ul><ul><li>Notes F/X </li></ul></ul><ul><li>The Renaissance brought us new tools </li></ul><ul><ul><li>OLE automation </li></ul></ul><ul><ul><li>COM automation </li></ul></ul><ul><ul><li>XML </li></ul></ul><ul><ul><li>Web Services </li></ul></ul>
    10. 10. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    11. 11. Definitions for Notes Programmers <ul><li>Let’s go over a few words you need to know </li></ul><ul><ul><li>COM </li></ul></ul><ul><ul><li>OLE </li></ul></ul>
    12. 12. What Is COM? <ul><li>Component Object Model </li></ul><ul><li>Microsoft standard </li></ul><ul><li>Defines the guidelines for objects </li></ul><ul><ul><li>Objects must tell all other programs what is supported </li></ul></ul><ul><ul><ul><li>Properties </li></ul></ul></ul><ul><ul><ul><li>Methods </li></ul></ul></ul><ul><ul><ul><li>Objects </li></ul></ul></ul><ul><li>Consistent, programmatic access to functionality </li></ul>
    13. 13. What Is OLE? <ul><li>Object linking and embedding </li></ul><ul><li>Another Microsoft standard </li></ul><ul><li>Allows one application document to include a portion of another application </li></ul><ul><ul><li>A Word document with an Excel spreadsheet inside </li></ul></ul><ul><li>OLE/1 — attachments </li></ul><ul><li>OLE/2 — linking or embedding </li></ul>
    14. 14. OLE/1 — File Attachments <ul><li>Advantages </li></ul><ul><ul><li>Functionality clearly divided between applications </li></ul></ul><ul><ul><li>No memory issues </li></ul></ul><ul><ul><li>Much smaller size footprint </li></ul></ul><ul><ul><li>Enables template usage </li></ul></ul><ul><li>Disadvantages </li></ul><ul><ul><li>Requires more planning </li></ul></ul><ul><ul><li>More effort for basic functionality </li></ul></ul><ul><ul><li>Attachment does not know about the Notes object </li></ul></ul><ul><ul><li>Must manually connect and update </li></ul></ul><ul><li>Notes 6 added the ability to round-trip edit attachments </li></ul>
    15. 15. OLE/2 — Linking and Embedding <ul><li>Advantages </li></ul><ul><ul><li>Integrated — single interface when using embedded objects (when used in-line) </li></ul></ul><ul><ul><li>Document containing objects is “aware” of the embedded object </li></ul></ul><ul><ul><li>Less work to get object open for the user </li></ul></ul>
    16. 16. OLE/2 — Linking and Embedding (cont.) <ul><li>Disadvantages </li></ul><ul><ul><li>OLE embedded objects are </li></ul></ul><ul><ul><ul><li>Much bigger … 10 to 15 times </li></ul></ul></ul><ul><ul><ul><li>Difficult for users when the object is more than one page </li></ul></ul></ul><ul><ul><li>OLE embedding was not reliable before Office XP with Windows XP </li></ul></ul><ul><ul><li>File menu of container application is never updated </li></ul></ul><ul><li>#1 Issue … no clean way to export data from embedded objects </li></ul><ul><ul><li>“ Locked” data is bad </li></ul></ul>
    17. 17. Early Binding vs. Late Binding <ul><li>Early binding is when you declare what an object variable will be before you actually assign the object to it </li></ul><ul><ul><li>Dim db as NotesDatabase </li></ul></ul><ul><ul><li>Set db = session.currentdatabase </li></ul></ul><ul><li>Late binding is when you assign an object to a variable without creating the object variable before hand </li></ul><ul><ul><li>Set db = New NotesDatabase(“server”, “names.nsf”) </li></ul></ul><ul><li>Early binding is much more efficient than late binding </li></ul>
    18. 18. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    19. 19. Integration From Notes <ul><li>From Notes, you will write code to manipulate the application </li></ul><ul><li>In most cases, you will be converting Visual Basic for Applications (VBA) code to LotusScript </li></ul><ul><li>The VBA code will be written so it saves in Notes as LotusScript </li></ul><ul><li>Once you get the knack of converting the code, you can focus on the process vs. the code </li></ul>
    20. 20. Demo 01 Creating a Word Document — “Hello World”
    21. 21. Creating a Word Document <ul><ul><li>Create an instance of the application object </li></ul></ul><ul><ul><li>All applications that support COM have object names </li></ul></ul><ul><li>To find the object name </li></ul><ul><ul><ul><li>Review the application documentation </li></ul></ul></ul><ul><ul><ul><li>Look it up in the Windows registry </li></ul></ul></ul><ul><li>Never use version-specific application object names </li></ul><ul><ul><ul><li>Good: Word.application </li></ul></ul></ul><ul><ul><ul><li>Bad: Word.application.11 </li></ul></ul></ul><ul><ul><ul><li>When the application upgrades, you must modify your code </li></ul></ul></ul>Set hwd = CreateObject(&quot;Word.Application&quot;) Variant Application Object Name LotusScript Method
    22. 22. Creating a Word Document (cont.) <ul><li>You must follow the applications object model: </li></ul><ul><ul><li>Word.application </li></ul></ul><ul><ul><ul><li>Documents </li></ul></ul></ul><ul><ul><ul><ul><li>Document </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Paragraph </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Bookmark </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>CustomDocumentProperties </li></ul></ul></ul></ul></ul><ul><li>If accessing the current open document, use </li></ul><ul><ul><ul><li>Application.ActiveDocument </li></ul></ul></ul><ul><ul><ul><li>Application.ActiveWorkbook </li></ul></ul></ul><ul><ul><ul><li>Application.ActivePresentation </li></ul></ul></ul><ul><ul><ul><li>Etc. </li></ul></ul></ul><ul><li>All applications have an object map in help </li></ul>
    23. 23. The Easiest Way to Start <ul><li>Microsoft Office provides us with a recorder </li></ul><ul><li>Records all keyboard actions </li></ul><ul><ul><li>Mouse actions are sometimes recorded, so avoid when possible </li></ul></ul><ul><li>Generates VBA code for you </li></ul><ul><li>Easy way to learn how something is done </li></ul><ul><ul><li>Table is created </li></ul></ul><ul><ul><li>Page settings are set </li></ul></ul><ul><ul><li>Etc. </li></ul></ul>
    24. 24. What’s up with the Recorded Syntax? <ul><li>This is the recorded syntax: </li></ul><ul><li>Saving LotusScript with wdToggle and wdAlignParagraphCenter fails! </li></ul><ul><li>Need to replace VBA constants with raw values </li></ul><ul><ul><li>Write a macro </li></ul></ul><ul><ul><ul><li>Msgbox [constantname] </li></ul></ul></ul><ul><li>Or … </li></ul>Selection.TypeText Text:=&quot;this is new text&quot; Selection.TypeParagraph Selection.TypeParagraph Selection.Font.Bold = wdToggle Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter Selection.TypeText Text:=&quot;this is more text&quot;
    25. 25. Use the Microsoft Constants Database <ul><li>Provides a listing of all Microsoft Office variables and their converted constants </li></ul><ul><li>Extraction of constants by John Collidge </li></ul><ul><li>Database built by Tom Duff </li></ul><ul><li>Now an project </li></ul><ul><li>Supports Microsoft Office 2000, XP, 2003, and 2007 </li></ul><ul><li>More features planned! </li></ul>
    26. 26. Domino COM Basics <ul><li>Working with the Domino Objects is almost the same as writing code in Notes! </li></ul><ul><li>Only supports backend objects </li></ul><ul><ul><li>No NotesUIDocument, NotesUIView, NotesUIWorkspace, etc. </li></ul></ul><ul><li>COM support was added in Notes 5.0.2b </li></ul><ul><li>Updated in 6.5.1 to support 6.X </li></ul><ul><li>ND7 COM support out of the box </li></ul><ul><li>COM interface is the same as LotusScript, with some minor exceptions </li></ul>
    27. 27. Registering the Notes COM Objects <ul><li>Sometimes Notes does not register itself properly with the Windows registry </li></ul><ul><ul><li>From the Windows run line </li></ul></ul><ul><ul><ul><li>Regsvr32 “c:program fileslotus otes lsxbe.dll” </li></ul></ul></ul><ul><ul><li>From a Notes agent </li></ul></ul><ul><ul><ul><li>Shell(|regsvr32 “c:program fileslotus otes lsxbe.dll|) </li></ul></ul></ul>
    28. 28. Domino COM Basics <ul><li>Before you start writing VBA code, you must load the Domino COM objects </li></ul><ul><ul><li>In MS Office  Tools  References </li></ul></ul>
    29. 29. Domino COM Basics (cont.) <ul><li>The COM objects must be able to find the Notes.ini </li></ul><ul><ul><li>Looks in: </li></ul></ul><ul><ul><ul><li>Notes program directory </li></ul></ul></ul><ul><ul><ul><li>Path </li></ul></ul></ul><ul><li>KeyFileName in Notes.ini is used to determine what ID to use for authentication </li></ul><ul><li>Multiple installed version of Notes is a problem </li></ul><ul><ul><li>Uses the last installed version </li></ul></ul><ul><ul><ul><li>HKEY_CLASSES_ROOT.nsfShellOpenCommand </li></ul></ul></ul><ul><ul><ul><li>HKEY_CLASSES_ROOT otes.exeShellOpenCommand </li></ul></ul></ul><ul><ul><ul><li>HKEY_LOCAL_MACHINESOFTWARELotusNotes </li></ul></ul></ul>
    30. 30. Make Your End Users Happy! <ul><li>Prevent password prompts by … </li></ul>Notes 5.X Notes 6 and 7
    31. 31. Domino COM Basics <ul><li>Must use “NotesSession.Initialize(&quot;&quot; ) ” to establish connection between application and Notes </li></ul><ul><li>Can not use extended syntax (i.e., dot notation) to reference items in a document </li></ul><ul><ul><li>NO </li></ul></ul><ul><ul><ul><li>NotesDocument.Form(0) </li></ul></ul></ul><ul><ul><li>YES </li></ul></ul><ul><ul><ul><li>NotesDocument.GetItemValue(“Form ”)(0) </li></ul></ul></ul>
    32. 32. Domino COM Basics <ul><li>Can not use “New” to create Domino objects </li></ul><ul><ul><li>Exception is NotesSession </li></ul></ul><ul><ul><li>NO </li></ul></ul><ul><ul><ul><li>Dim db as New NotesDatabase(server, dbpath) </li></ul></ul></ul><ul><ul><li>YES </li></ul></ul><ul><ul><ul><li>Dim db as NotesDatabase </li></ul></ul></ul><ul><ul><ul><li>Set db = NotesSession.GetDatabase(server, path) </li></ul></ul></ul>
    33. 33. Domino COM Basics <ul><li>No such thing as a “current” environment or object </li></ul><ul><ul><li>No CurrentDatabase, DocumentContext, etc. </li></ul></ul><ul><li>If a property returns an array of objects, you must assign the property to a variable first </li></ul><ul><ul><li>NO </li></ul></ul><ul><ul><ul><li>Dim view as NotesView </li></ul></ul></ul><ul><ul><ul><li>Set view = NotesDatabase.Views(0) </li></ul></ul></ul><ul><ul><li>YES </li></ul></ul><ul><ul><ul><li>Dim views as Variant, view as NotesView </li></ul></ul></ul><ul><ul><ul><li>views = NotesDatabase.Views </li></ul></ul></ul><ul><ul><ul><li>Set view = views(0) </li></ul></ul></ul>
    34. 34. Domino COM Basics <ul><li>VB doesn’t use Forall…EndAll </li></ul><ul><ul><li>Uses For Each…Next instead </li></ul></ul><ul><li>VB doesn’t support Today keyword </li></ul><ul><li>VB doesn’t support using pipes ( | ) and braces ( {} ) for string delimiting </li></ul><ul><li>Refer to ND Designer Help for more information </li></ul>
    35. 35. Demo 02 Word Template — Data From Notes
    36. 36. Managing the Template <ul><li>How did I get that template in my new dialog? </li></ul><ul><li>Template installation tool </li></ul><ul><ul><li>Each template is a document </li></ul></ul><ul><ul><li>Supports all Office 2000 thru 2007 applications </li></ul></ul><ul><li>Can also be used as a programmatic template tool </li></ul><ul><li>Located on </li></ul>
    37. 37. Merging Mail From Notes <ul><li>Most requested Notes to Office integration functionality </li></ul><ul><li>Users have no idea how to get data from Notes into Word </li></ul><ul><li>Lotus has not provided this functionality … yet </li></ul><ul><li>Quick win for you — take this code back and add it to your boss’s personal name and address book and be the HERO! </li></ul>
    38. 38. Mail Merge in Different Versions of Word <ul><li>Mail merge is version specific </li></ul><ul><ul><li>One version for Word 2000 and before </li></ul></ul><ul><ul><li>One version for Word XP </li></ul></ul><ul><ul><li>One version for Word 2003 </li></ul></ul><ul><ul><ul><li>Minor change on closing documents in 2003 </li></ul></ul></ul><ul><ul><li>New version for Word 2007 </li></ul></ul>
    39. 39. Use the Mail Merge Wizard to Your Advantage <ul><li>The Mail Merge Wizard has six steps </li></ul><ul><ul><li>1. Select document type </li></ul></ul><ul><ul><li>2. Select starting document </li></ul></ul><ul><ul><li>3. Select recipients </li></ul></ul><ul><ul><li>4. Write your letter </li></ul></ul><ul><ul><li>5. Preview your letters </li></ul></ul><ul><ul><li>6. Complete the merge </li></ul></ul><ul><li>You can control which: </li></ul><ul><ul><li>Wizard steps display </li></ul></ul><ul><ul><li>Step to start on </li></ul></ul>
    40. 40. Demo 03 Mail Merge From Address Book
    41. 41. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    42. 42. Integration with Microsoft Excel <ul><li>Working with Excel is very different than Word </li></ul><ul><li>The objects we use are different </li></ul><ul><li>In Excel, we tend to move more data from Notes to the application </li></ul><ul><ul><li>Lots of rows in Excel vs. filling in bookmarks in Word </li></ul></ul>Microsoft Word Microsoft Excel Text Position/Cursor Cell Paragraph Range Page Worksheet Document Workbook
    43. 43. The Beginning with Excel <ul><li>To start, use a different object </li></ul><ul><ul><li>Set hwd = CreateObject(&quot;Excel.Application&quot;) </li></ul></ul><ul><li>Next, create a new workbook </li></ul><ul><ul><li>hwd.Workbooks.Add </li></ul></ul><ul><li>And it’s time to add data </li></ul>
    44. 44. Working with Cells and Ranges <ul><li>We can work with cells or ranges </li></ul><ul><ul><li>For operating on a specific cell … hwd.cells(1,1).value=“Name” </li></ul></ul><ul><ul><li>hwd.cells(1,2).value=“Category” </li></ul></ul><ul><ul><li>For operating on multiple cells … use a range xlRange=&quot;$A$1:$C$1“ </li></ul></ul><ul><ul><li>With hwd </li></ul></ul><ul><ul><li>.Range(xlRange).Font.Bold = True ' set row to bold </li></ul></ul><ul><ul><li>.Range(xlRange).Borders.LineStyle=1' set border </li></ul></ul><ul><ul><li>.Range(xlRange).Borders.Weight=1 ' set weight of border </li></ul></ul><ul><ul><li>End With </li></ul></ul>
    45. 45. Dealing with the Default Row and Column Size <ul><li>Excel does not autosize columns and rows </li></ul><ul><li>Do it within your code hwd.Range(xlRange).EntireColumn.AutoFit or hwd.Range(xlRange).EntireRow.AutoFit </li></ul>
    46. 46. Creating a Chart <ul><li>xlRange=&quot;$A$1:$C$10&quot; </li></ul><ul><li>hwd.Charts.Add </li></ul><ul><li>hwd.ActiveChart.ChartType = 51 </li></ul><ul><li>hwd.ActiveChart.SetSourceData hwd.Sheets(&quot;Sheet1&quot;).Range(&quot;A1:C10&quot;), 2 </li></ul><ul><li>hwd.ActiveChart.SeriesCollection(1).Name = &quot;=&quot;&quot;Notes Chart&quot;&quot;&quot; </li></ul><ul><li>hwd.ActiveChart.Location 2, &quot;Sheet1“ </li></ul><ul><li>With hwd.ActiveChart </li></ul><ul><li>.HasTitle = True </li></ul><ul><li>.ChartTitle.Characters.Text = &quot;Notes to Excel Demo“ </li></ul><ul><li>.Axes(1,1).HasTitle = True </li></ul><ul><li>.Axes(1,1).AxisTitle.Characters.Text = &quot;X Axis“ </li></ul><ul><li>.Axes(2,1).HasTitle = True </li></ul><ul><li>.Axes(2,1).AxisTitle.Characters.Text = &quot;Y Axis“ </li></ul><ul><li>.ApplyDataLabels 2, True </li></ul><ul><li>.HasDataTable = False </li></ul><ul><li>End With </li></ul><ul><li>hwd.ActiveSheet.Shapes(&quot;Chart 1&quot;).ScaleHeight 1.46, 0,0 </li></ul>
    47. 47. Demo 04 Working with Microsoft Excel
    48. 48. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    49. 49. Integration with Microsoft PowerPoint <ul><li>PowerPoint is closer to Word than Excel </li></ul>Microsoft Word Microsoft PowerPoint Text Position/Cursor Text Position/Cursor Paragraph Text Block Page Slide Document Presentation
    50. 50. The Beginning with PowerPoint <ul><li>To start, use the PowerPoint object </li></ul><ul><ul><li>Set hwd = CreateObject(“PowerPoint.Application&quot;) </li></ul></ul><ul><li>Next, create a new presentation </li></ul><ul><ul><li>hwd.Presentation.Add 1, 1 </li></ul></ul><ul><li>And it’s time to add data </li></ul>
    51. 51. Working with PowerPoint Shapes <ul><li>Every slide has shapes </li></ul><ul><ul><li>Title text box </li></ul></ul><ul><ul><li>Bullet text box </li></ul></ul><ul><ul><li>Etc. </li></ul></ul><ul><li>Each shape has a name </li></ul><ul><ul><li>Finding the name is typically “hunt and peck” </li></ul></ul><ul><ul><li>I always use the macro function to determine the shape name </li></ul></ul><ul><ul><li>You can also write a macro </li></ul></ul>
    52. 52. Working with Shapes <ul><li>You have to navigate to enter text in PowerPoint </li></ul><ul><ul><li>Shape </li></ul></ul><ul><ul><li>TextFrame </li></ul></ul><ul><ul><li>Characters </li></ul></ul><ul><ul><li>Selection </li></ul></ul>hwd.ActiveWindow.Selection.SlideRange.Shapes(&quot;Rectangle 2&quot;).Select hwd.ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select hwd.ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(1,0).Select With hwd.ActiveWindow.Selection.TextRange .Text = sessiontitle End With
    53. 53. Demo 05 Working with PowerPoint
    54. 54. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    55. 55. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    56. 56. Automation From the Microsoft Side <ul><li>Many integration scenarios require that user interaction start or solely be from an application other than Notes </li></ul><ul><li>Many times we will not have the Notes client installed </li></ul><ul><li>We will not be writing LotusScript </li></ul><ul><ul><li>We may call LotusScript thru the Notes COM interface </li></ul></ul><ul><li>We need to take advantages of “new” technologies </li></ul><ul><ul><li>XML </li></ul></ul><ul><ul><li>Web services </li></ul></ul><ul><ul><li>.NET </li></ul></ul><ul><ul><li>Managed code </li></ul></ul>
    57. 57. About Web Services <ul><li>Self-contained application published and invoked from the Web </li></ul><ul><li>Based on XML </li></ul><ul><li>Uses WSDL and SOAP </li></ul><ul><li>Designed for machine-to-machine interaction </li></ul><ul><li>Advantages </li></ul><ul><ul><li>Connects various applications running on different platforms </li></ul></ul><ul><ul><li>Uses open standards and protocols </li></ul></ul><ul><ul><li>Uses HTTP, bypassing firewall and other security measures </li></ul></ul><ul><li>Disadvantages </li></ul><ul><ul><li>Poor performance as opposed to DCOM (Distributed COM) </li></ul></ul><ul><ul><li>Requires an internet connection for both the client and the server </li></ul></ul>
    58. 58. Calling a Web Service from Microsoft Word <ul><li>To call a Web service from Word (or other Office application), use the following code: </li></ul><ul><li>SWSDL = &quot;; </li></ul><ul><li>Set Client = CreateObject(&quot;MSSOAP.SoapClient&quot;) </li></ul><ul><li>Call Client.mssoapinit(sWSDL) </li></ul><ul><li>GetSessionList = Client.ListAllSessions </li></ul><ul><li>This code uses the SOAPClient control that is part of Windows and Internet Explorer </li></ul><ul><li>SOAP is a way to package and interact with a Web service </li></ul>
    59. 59. More Detailed Web Services with Word <ul><li>Now, we want to take something the user selected and get more info about it </li></ul><ul><li>This is a second method in the Web service </li></ul><ul><li>Public Function GetSessionFieldValue(sessionid, fieldName) As String </li></ul><ul><li>sWSDL = &quot;; </li></ul><ul><li>Set Client = CreateObject(&quot;MSSOAP.SoapClient&quot;) </li></ul><ul><li>Call Client.mssoapinit(sWSDL) </li></ul><ul><li>GetSessionFieldValue = Client.GetSessionInfo(sessionid, fieldName) </li></ul><ul><li>End Function </li></ul><ul><li>Sessionid and fieldname are values we pass into the Web service </li></ul><ul><li>The return value comes back as string </li></ul>
    60. 60. Demo Preview - Word 2007 and Web Services <ul><li>Same demo as the Word 2007 COM demo from the previous session </li></ul><ul><li>Different technology </li></ul><ul><li>Get to the same place with different technique </li></ul><ul><li>Code written inside the Visual Basic for Applications IDE </li></ul>
    61. 61. Demo 06 Word 2007 Demo — Web Services
    62. 62. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    63. 63. Office and XML Details <ul><li>Office 2003 added XML support </li></ul><ul><ul><li>Word and Excel </li></ul></ul><ul><ul><li>Export-like Save option </li></ul></ul><ul><li>Excel can import data from an XML file </li></ul><ul><li>Import XML schema </li></ul><ul><li>Transform XML with XML style sheets </li></ul>
    64. 64. Office and XML (cont.) <ul><li>Office 2007 uses XML as the default new file format </li></ul><ul><li>Microsoft is working to make the new XML file format an ISO standard </li></ul><ul><ul><li>Called Open XML </li></ul></ul><ul><li>Office 2003 can open these new formats with an update you can download from Microsoft </li></ul><ul><li>Manipulating the Open XML file directly is the lowest level of automating Office </li></ul><ul><ul><li>Developers have been requesting this functionality for years </li></ul></ul><ul><ul><li>Extreme level of difficulty </li></ul></ul><ul><ul><li>Heavily documented </li></ul></ul><ul><ul><li>Real-world samples lacking </li></ul></ul>
    65. 65. Working with Open XML <ul><li>The Office 2007 file formats are compressed directories </li></ul><ul><ul><li>Think a “zip” file </li></ul></ul><ul><li>You can view the directory by renaming the file extension to .zip </li></ul><ul><li>The easier way to view the file in native XML is through Package Explorer </li></ul><ul><ul><li>Developed by Wouter Van Vugt </li></ul></ul><ul><ul><li>Download from Codeplex </li></ul></ul><ul><ul><ul><li>( </li></ul></ul></ul>
    66. 66. Editing Open XML with Package Explorer <ul><li>Browse and edit Office Open XML packages </li></ul><ul><li>Edit XML parts in an XML aware editor </li></ul><ul><li>Validate parts with the ECMA (standards board) final schemas </li></ul><ul><li>Edit Dublin Core properties directly in a property grid </li></ul><ul><li>Improved usability (dirty bit management) </li></ul><ul><li>Docking UI </li></ul>
    67. 67. Working with Domino Data as XML <ul><li>Use the core Domino classes </li></ul><ul><ul><li>LotusScript and Java </li></ul></ul><ul><li>Domino XML (DXL) </li></ul><ul><li>Cheat  </li></ul><ul><ul><li>Add passthru HTML to a form </li></ul></ul><ul><ul><li>Build your own agent to output XML </li></ul></ul>
    68. 68. A Domino Agent That Creates XML <ul><li>Dim s As New NotesSession </li></ul><ul><li>Dim db As NotesDatabase </li></ul><ul><li>Dim doc As NotesDocument </li></ul><ul><li>Dim view As NotesView </li></ul><ul><li>Set db = s.currentDatabase </li></ul><ul><li>Set view = db.GetView( &quot;XML&quot; ) </li></ul><ul><li>Set doc = view.GetFirstDocument </li></ul><ul><li>Print &quot;Content-type: text/xml“ </li></ul><ul><li>Print &quot;<BOOKCATALOG>“ </li></ul><ul><li>While Not ( doc Is Nothing ) </li></ul><ul><li>Print &quot;<BOOK>&quot; </li></ul><ul><li>Print &quot;<bookTitle>&quot;+doc.bookTitle(0)+&quot;</bookTitle>“ </li></ul><ul><li>Print &quot;<bookAuthor>&quot;+doc.bookAuthor(0)+&quot;</bookAuthor>&quot; </li></ul><ul><li>Print &quot;<bookPrice>&quot;+doc.bookDiscountPrice(0)+&quot;</bookPrice>&quot; </li></ul><ul><li>Print &quot;<bookCategory>&quot;+doc.bookCategory(0)+&quot;</bookCategory>&quot; </li></ul><ul><li>Print &quot;</BOOK>&quot; </li></ul><ul><li>Set doc = view.GetNextDocument( doc ) </li></ul><ul><li>Wend </li></ul><ul><li>Print &quot;</BOOKCATALOG>&quot; </li></ul>
    69. 69. How Domino Data Looks as XML
    70. 70. Using XML with Excel <ul><li>Read XML from a Notes database </li></ul><ul><li>XML generated via an agent in Notes database </li></ul><ul><li>Chart the data using Excel charting tools </li></ul><ul><li>Works with Domino 5.X, 6.X, 6.5.X, 7, and 8 </li></ul><ul><li>For this example, we will not write any code! </li></ul>
    71. 71. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    72. 72. Four Main Solutions Available <ul><li>Crystal Reports </li></ul><ul><li>IntelliPRINT Analytics/Reporting </li></ul><ul><li>Swing </li></ul><ul><li>Integra4Notes/Integra Quick Reports </li></ul>
    73. 73. Crystal Reports <ul><li>Top of the line reporting </li></ul><ul><li>Designed for developers and top end power users </li></ul><ul><li>Version bundled with Visual Studio.NET </li></ul><ul><li>No built in Notes awareness </li></ul><ul><ul><li>Does not know Notes database design out of the box </li></ul></ul><ul><li>Uses ODBC connectivity today </li></ul><ul><ul><li>Used to have a Notes driver; it was removed a few years ago </li></ul></ul><ul><ul><li>Can be very slow </li></ul></ul><ul><li>Client installs required </li></ul><ul><li>The most expensive of the four </li></ul>
    74. 74. IntelliPRINT Reporting <ul><li>Basic reporting functionality </li></ul><ul><li>Advanced reporting capabilities are difficult to use </li></ul><ul><li>No end-user reporting functionality </li></ul><ul><li>Development of reports will be a struggle for most Notes Developers </li></ul><ul><li>Client installs required </li></ul><ul><li>No server side report generation </li></ul>
    75. 75. Swing Integrator <ul><li>Developers’ toolkit vs. Product </li></ul><ul><li>Swing Wizard adds design elements to each application </li></ul><ul><ul><li>Forms, script libraries, views, etc. </li></ul></ul><ul><li>Subform and code added to each form </li></ul><ul><li>Works on the Web and in the Notes client </li></ul><ul><li>Functionality out of the box is very good </li></ul><ul><li>Extending the functionality is difficult to impossible </li></ul>
    76. 76. Integra4Notes and Integra Quick Reports <ul><li>Integra4Notes </li></ul><ul><ul><li>A Notes application that allows importing and exporting of data between Lotus Notes and Word, Excel, PDF files, and XML files </li></ul></ul><ul><ul><li>A powerful tool for the Notes developers </li></ul></ul><ul><li>Integra Quick Reports </li></ul><ul><ul><li>Ad-hoc reporting for end-users to Microsoft Excel </li></ul></ul><ul><ul><li>Mail merge and labels to Microsoft Word </li></ul></ul><ul><ul><li>From any Lotus Notes database </li></ul></ul>
    77. 77. Integra4Notes Key Features and Benefits <ul><li>More advanced capabilities </li></ul><ul><ul><li>Event driven script, for example </li></ul></ul><ul><ul><li>Access multiple databases and sources </li></ul></ul><ul><ul><ul><li>Oracle, SAP, mySQL, etc. </li></ul></ul></ul><ul><li>Non-intrusive — no designer changes </li></ul><ul><li>Zero footprint — no exe, no DLLs , etc. </li></ul><ul><li>Distribute via email, save to Notes document, send doclinks, send to printer, fax, etc. </li></ul><ul><li>Notes client, browser, and scheduled </li></ul><ul><li>Export and import </li></ul><ul><li>Generate PDFs </li></ul>
    78. 78. Third-Party Application Demonstration
    79. 79. Agenda <ul><li>Introduction </li></ul><ul><li>Definitions </li></ul><ul><li>The basics and Microsoft Word </li></ul><ul><li>Microsoft Excel Charting </li></ul><ul><li>Microsoft PowerPoint </li></ul><ul><li>Web Services and Microsoft Word </li></ul><ul><li>Office and XML </li></ul><ul><li>Third Party Solutions </li></ul><ul><li>More More More </li></ul><ul><li>Q & A </li></ul>
    80. 80. More More More <ul><li>Microsoft Infopath and Web Services </li></ul><ul><li>VB.NET and Domino COM </li></ul><ul><li>Visual Studio Tools for Office </li></ul><ul><li>ASP.NET </li></ul><ul><li>Visual Studio.NET 200X (“Orcas”) </li></ul><ul><li>etc </li></ul>
    81. 82. Wrap-up <ul><li>Demonstrated multiple technology paths to reach the same goal </li></ul><ul><li>Discussed COM/OLE, Web Services, and XML </li></ul><ul><li>Walked thru lots of examples </li></ul><ul><li>Hopefully gave you ideas on how to add value to your applications </li></ul>
    82. 83. Resources <ul><li>MSDN </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li>John Head’s blog </li></ul><ul><li> </li></ul><ul><li>Slides and content update available from </li></ul><ul><li> </li></ul>
    83. 84. <ul><li>Thank you! </li></ul><ul><li>Questions & Answers </li></ul><ul><li>Please remember to fill out your evaluation. </li></ul><ul><li>[email_address] </li></ul><ul><li> </li></ul>