Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime. Virtual User Group Meeting - The Real World Integration


Published on

How Lotus Notes & Domino Can Work with Microsoft Office, Lotus Symphony and the Power of Integra for Notes

Published in: Technology, Business
  • Login to see the comments Virtual User Group Meeting - The Real World Integration

  1. 1. The Real World of Integration: How Lotus Notes & Domino Can Work with Microsoft Office, Lotus Symphony and the Power of Integra for Notes <ul><ul><li>John D. Head </li></ul></ul><ul><ul><li>Alex Kassabov </li></ul></ul>
  2. 2. Who are we? <ul><li>John D. Head ( </li></ul><ul><li>Director of Enterprise Collaboration at PSC Group, LLC </li></ul><ul><li>Speaker, Author – Lotus Guru </li></ul><ul><li>Alex Kassabov ( </li></ul><ul><li>Vice President of Collaboration at PSC Group, LLC </li></ul><ul><li>Speaker – Industry Expert </li></ul>
  3. 3. PSC Group, LLC <ul><li>IBM Premium Business Partner for 18+ Years </li></ul><ul><li>Microsoft Managed Partner </li></ul><ul><li>Notes & Domino 8.5 Design Partner </li></ul><ul><li>Host of </li></ul><ul><li>Former Host of </li></ul><ul><li>Winner of 2007 & 2009 Lotus Awards! </li></ul><ul><li>Host of the following blogs: </li></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>Domino Server Team (‏ </li></ul></ul><ul><ul><li>Lotus Connections Team ( </li></ul></ul><ul><ul><li>Chris Pepin – IBM CTO’s Office ( </li></ul></ul><ul><ul><li>Lotus Usability (Mary Beth Raven) ( </li></ul></ul>
  4. 4. Agenda <ul><li>Integration Background </li></ul><ul><li>Integration from the Notes client </li></ul><ul><li>Integration from other applications </li></ul><ul><li>Integration from a web browser </li></ul><ul><li>Reporting Options </li></ul><ul><li>Looking forward </li></ul><ul><li>Wrap-up and Q&A </li></ul>
  5. 5. 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>
  6. 6. 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>
  7. 7. 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>
  8. 8. Integration from Notes <ul><li>From Notes, you will write code to manipulate the application </li></ul><ul><li>You can integrate pretty much with anything </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>
  9. 9. Creating a Word Document <ul><li>Create an instance of the application object </li></ul><ul><li>All applications that support COM have object names </li></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>Variant Application Object Name LotusScript Method Set hwd = CreateObject(&quot;Word.Application&quot;)
  10. 10. Creating a Word Document (cont.) <ul><li>You must follow the application’s 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>
  11. 11. 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>
  12. 12. 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;
  13. 13. Creating a Word Document — “Hello World” Demo — Example 1 Launch Microsoft Word and enter some text
  14. 14. 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>
  15. 15. 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>
  16. 16. 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>
  17. 17. Mail Merge from Address Book Demo — Example 2 Generate a mail merge from the personal name and address book
  18. 18. Moving to the Other Side <ul><li>This part covers the more advanced subjects </li></ul><ul><ul><li>Such as automating Lotus Notes from Microsoft Office and other technologies </li></ul></ul><ul><ul><li>We will use COM, XML, Web services, and .NET technologies </li></ul></ul>
  19. 19. Things we CAN do … <ul><li>Microsoft Word and Web services </li></ul><ul><li>Microsoft Excel and XML </li></ul><ul><li>Microsoft InfoPath and Web services </li></ul><ul><li>.NET and Lotus Notes/Domino </li></ul><ul><li>Visual Studio tools for Office </li></ul>
  20. 20. 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 through the Notes COM interface </li></ul></ul><ul><li>We need to take advantage 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>
  21. 21. 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 back-end 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, 8 & 8.5 – COM support out of the box </li></ul><ul><li>COM interface is the same as LotusScript, with some minor exceptions </li></ul>
  22. 22. 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>
  23. 23. 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>
  24. 24. Make Your End Users Happy! <ul><li>Prevent password prompts by … </li></ul>Notes 5.X Notes 6, 7 and 8
  25. 25. Word Template — Data from Notes Demo — Example 3 Create a new document Prompt user Place data into document
  26. 26. 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 Distributed COM (DCOM) </li></ul></ul><ul><ul><li>Requires an Internet connection </li></ul></ul>
  27. 27. First Things First <ul><li>First, you need to build a Web service </li></ul><ul><li>It can be written using LotusScript, Java, or importing WSDL </li></ul><ul><li>It is very similar to an agent </li></ul><ul><li>To be able to write a Web service, you must know how to write a class </li></ul><ul><li>If you are working with Notes 6.5 or before, you can build an agent and “fake” it into being a Web service </li></ul>
  28. 28. Web Service Classes <ul><li>Example of a simple LotusScript custom class: </li></ul><ul><li>Class GetPersonInfo </li></ul><ul><li>Sub New </li></ul><ul><li>End Sub </li></ul><ul><li>Public Function GetEmailAddress(personname As String) As String </li></ul><ul><li>End Function </li></ul><ul><li>Public Function GetPhoneNumber(personname As String) As String </li></ul><ul><li>End Function </li></ul><ul><li>End Class </li></ul><ul><li>Just like an agent, except the New function </li></ul><ul><ul><li>Acts just like the agent Initialize </li></ul></ul>
  29. 29. 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>
  30. 30. 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>
  31. 31. Ways to Add Domino Functionality to ASP.NET <ul><li>Using Notes/Domino’s COM interface </li></ul><ul><li>Using Domino Web services </li></ul><ul><li>Using Domino Web agents and XML </li></ul><ul><li>NOTE: Selecting the right option is dependent on the Domino Server version and the developer’s skill </li></ul>
  32. 32. Domino COM in ASP <ul><li>From within Visual Studio .NET, using the ASP.NET template </li></ul><ul><li>Add the Domino COM reference like we have done in Office and VSTO </li></ul><ul><li>Build the ASP.NET page </li></ul>
  33. 33. Building the ASP.NET Page <ul><li>Add the standard fields and labels to the ASP page </li></ul><ul><li>The COM code is behind the button </li></ul>
  34. 34. ASP.NET Calling a Domino Web Service <ul><li>We will call a Domino Web service </li></ul><ul><li>ASP.NET will import the Web service </li></ul>
  35. 35. ASP.NET Calling Domino via a Web Service Demo — Example 4 Creating an ASP.NET Web page that calls Domino via a Web service
  36. 36. 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>The premier reporting framework for 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>
  37. 37. 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><ul><ul><li>4.5 ships with print driver – no extra cost </li></ul></ul>
  38. 38. Third-Party Application Demonstration Demo — Example 5 Integra4Notes and Integra Quick Report samples
  39. 39. Integra for Notes Personal Edition <ul><li>Provides the user with integration for their Contacts to do the following: </li></ul><ul><ul><li>Mail Merge </li></ul></ul><ul><ul><li>Labels </li></ul></ul><ul><ul><li>Mass Email </li></ul></ul><ul><ul><li>Export to Excel </li></ul></ul><ul><ul><li>Ad-hoc export to Excel with Pivot Tables and Charting </li></ul></ul><ul><li>Supports Notes 6.5, 7, 8, & 8.5 </li></ul><ul><li>Supports Office 97 thru 2007 </li></ul> FREE!!!!
  40. 40. Lotus Symphony – The Developer Perspective <ul><li>Symphony has multiple methods for customization </li></ul><ul><ul><li>UNO API </li></ul></ul><ul><ul><li>Symphony Plug-ins </li></ul></ul><ul><ul><li>Composite Applications </li></ul></ul>
  41. 41. Introduction to development <ul><li>Designed on an interface-based component model called Universal Network Objects (UNO) </li></ul><ul><li>UNO definition </li></ul><ul><ul><li>UNO offers interoperability between different programming languages, different object models, different machine architectures, and different processes; either in a local network or even via the Internet </li></ul></ul><ul><ul><li>UNO components can be implemented in, and accessed from, any programming language for which a UNO language binding exists </li></ul></ul>
  42. 42. Does this work with Lotus Symphony? <ul><li>The demo will be done using Lotus Symphony </li></ul><ul><li>You will need Notes 8.0.1 or higher </li></ul><ul><ul><li>IBM has exposed the Lotus Symphony objects to the registry to allow COM to work </li></ul></ul><ul><li>If you want run the demos in 8.0.0, they will invoke </li></ul>
  43. 43. What is the ServiceManager? <ul><li>ServiceManager is similar to the NotesSession class </li></ul><ul><li>It is a factory class that gets you to other places </li></ul><ul><ul><li>Set SM=CreateObject(&quot;;) </li></ul></ul><ul><li>Think of the ServiceManager as a back-end class, and we want the front end (like NotesUIWorkspace) </li></ul><ul><ul><li>Set Desktop=SM.createInstance(&quot;;) </li></ul></ul>
  44. 44. What Did That Do? <ul><li>Calling the ServiceManager created an window, but we need to do more … </li></ul>
  45. 45. Let’s Start Writer — Word Processing Application <ul><li>So far we have an OpenOffice.Org window, but it doesn’t know what application it will be — we have to tell it </li></ul><ul><li>Dim args() </li></ul><ul><li>Set WriterApplication=Desktop.loadComponentFromURL (&quot;private:factory/swriter&quot;,&quot;_blank&quot;,0,args) </li></ul><ul><li>Args is a variant array </li></ul><ul><ul><li>We don’t want to pass any parameters, but it must be an array </li></ul></ul><ul><li>The “s” in “swriter” stands for “Star” </li></ul><ul><li>Now we have a word processor up and running </li></ul>
  46. 46. The Picture So Far <ul><li>Now we have an application open </li></ul><ul><li>Time to do something! </li></ul>
  47. 47. Let’s Add Some Text <ul><li>First, we need to get a handle to the text part of the document </li></ul><ul><li>Set WriterText=WriterApplication.getText() </li></ul><ul><li>Next, we need a cursor position where we can insert the text </li></ul><ul><li>Set Cursor=WriterText.createTextCursor() </li></ul><ul><li>Finally, we can make the traditional greeting </li></ul><ul><li>Call WriterText.insertString(Cursor,&quot;Hello World!&quot;,False) </li></ul>
  48. 48. Hello World! <ul><li>After executing all of the code we walked through, this is the result </li></ul><ul><li>Now let’s try it for real </li></ul>
  49. 49. Notes to Writer Demo — Example 6 “ Hello World” from Notes to Writer
  50. 50. 2009 and Beyond <ul><li>We finally have great tools </li></ul><ul><ul><li>VS.NET 2008 </li></ul></ul><ul><ul><li>Lotus Symphony LotusScript API </li></ul></ul><ul><li>We have multiple options </li></ul><ul><ul><li>Office, Symphony,, Google Docs, etc. </li></ul></ul><ul><li>The Document Format Decision </li></ul><ul><ul><li>You will be forced into making a decision in the next 24 months </li></ul></ul><ul><li>Competition will be good for us … if we can deal with all the changes </li></ul>
  51. 51. If you are going to Lotusphere <ul><li>Jumpstart JMP205 - Integration of IBM Lotus Notes and Lotus Domino with Microsoft Office, .NET, and IBM Lotus Symphony </li></ul><ul><ul><li>Dolphin Americas Seminar : Sunday, 1/18/2009 : 8 AM to 9:30 AM </li></ul></ul><ul><ul><li>Swan : Sunday, 1/18/2009 : 1:30 PM to 3:30 PM </li></ul></ul><ul><li>BP110: IBM Lotus Symphony and You - A Developer's Perspective </li></ul><ul><ul><li>Swan 1-2 : Wednesday, 1/21/2009 : 10 AM to 11 AM </li></ul></ul><ul><li>BP305: The Document Format Dance </li></ul><ul><ul><li>Swan 1-2 : Wednesday, 1/21/2008 : 11:15 AM to 12:15 PM </li></ul></ul>
  52. 52. If you are NOT going to Lotusphere <ul><li>Don't despair </li></ul><ul><li>Full presentation slide decks and ALL demos will be available at </li></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul>
  53. 53. Thank You! Questions & Answers Samples available from [email_address] [email_address]