JMP205 - Integration of IBM Lotus Notes and Lotus Domino with Microsoft Office, .NET, and IBM Lotus Symphony
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

JMP205 - Integration of IBM Lotus Notes and Lotus Domino with Microsoft Office, .NET, and IBM Lotus Symphony

on

  • 13,408 views

Welcome to the real world, where Lotus Notes and Lotus Domino are just part of your corporate toolset. This session will introduce you to integration of Lotus Notes and Domino 8 and 8.5 with Microsoft ...

Welcome to the real world, where Lotus Notes and Lotus Domino are just part of your corporate toolset. This session will introduce you to integration of Lotus Notes and Domino 8 and 8.5 with Microsoft Office, .NET technologies, OpenOffice.org, and Lotus Symphony. We'll start with the basics and gradually build up to advanced integration. Mail Merge, exporting to a spreadsheet, charting, presentation building, and integration on the Web will all be covered. Advanced topics such as Visual Studio Tools for Office and integration with Lotus Domino Web Services will round out the session.

Statistics

Views

Total Views
13,408
Views on SlideShare
13,114
Embed Views
294

Actions

Likes
6
Downloads
427
Comments
0

7 Embeds 294

http://www.johndavidhead.com 247
http://www.slideshare.net 36
http://planetlotus.org 4
http://www.lotusphere09.com 3
http://johndavidhead.com 2
http://www.edbrill.com 1
http://www.e-presentations.us 1
More...

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

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.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

JMP205 - Integration of IBM Lotus Notes and Lotus Domino with Microsoft Office, .NET, and IBM Lotus Symphony Presentation Transcript

  • 1.  
  • 2. JMP205: Integration of IBM Lotus Notes and Lotus Domino with Microsoft Office, .NET, and IBM Lotus Symphony
      • John D. Head
      • Alex Kassabov
  • 3. Otherwise known as the … “Kum-bah-ya” session
  • 4. Before we begin
    • Please turn off/set to vibrate/mute all Cell Phones Pagers Computers Please remember to fill out your evaluations
  • 5. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Integration with Google Docs
    • Reporting Options
    • Real World Integration
    • Looking forward
    • Wrap-up and Q&A
    We are sharing 21 samples, 3 real world demos & 3 free take-homes … in 120 minutes … get ready!
  • 6. Who are we?
    • John D. Head
    • Director of Enterprise Collaboration at PSC Group, LLC
    • Involved in Lotus technology since 1993
    • Speaker
      • Over 30 sessions at Lotusphere since 1996
      • Speaker at Lotus Developer and ILUG conferences
    • Author
      • Advisor Magazine and other publications on Office and SmartSuite integration with Notes
      • LotusUserGroup.org contributing Author and Forum moderator
    • www.johndavidhead.com
  • 7. Who are we?
    • Alex Kassabov
    • Vice President of Collaboration at PSC Group, LLC
    • Involved in Lotus technology since 1995
      • Notes R3 – got dragged there kicking and screaming
    • Speaker
      • Lotusphere sessions on Desktop Integration
      • Collaboration Summit
      • GRAINTE Chicago Lotus User Group
  • 8. PSC Group, LLC
    • IBM Premium Business Partner for 18+ Years
    • Microsoft Managed Partner
    • Notes & Domino 8.5 Design Partner
    • Host of IdeaJam.net
    • Former Host of OpenNTF.org
    • Winner of 2007 & 2009 Lotus Award!
    • Host of the following blogs:
      • Ed Brill’s (www.edbrill.com)‏
      • Lotus Sametime (www.thesametimeblog.com)
      • Domino Server Team (www.dominoblog.com)‏
      • Lotus Connections Team
      • (synch.rono.us)
      • Lotus Usability (Mary Beth Raven) ( www.notesdesign.com )
      • Lotus Mashups (www.mix-and-mash.com)
      • Alan Gartenberg - DB2 (www.adamgartenberg.com)‏
      • Alan Lepofsky’s Notes Tip’s (www.alanlepofsky.net)‏
      • Chris Pepin – IBM CTO’s Office ( www.chrispepin.com )
  • 9. The Demo Databases
    • Presentation example database
      • Single database with all examples
      • You can configure it for your Notes client
      • Example numbers in the presentation match those in the database
    • Lotusphere 2009 session database
      • From Genii Software
      • Updated version inside the demo database
    • Personal name and address book
      • My demos work with the standard Notes 6, 7, 8, & 8.5 templates
  • 10. Let’s take a little poll …
    • Who is using …
      • Office 97 and earlier
      • Office 2000
      • Office XP
      • Office 2003
      • Office 2007
      • OpenOffice / StarOffice
      • Lotus Symphony
      • iWork
      • Other
  • 11. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Integration with Google Docs
    • Reporting Options
    • Real World Integration
    • Looking forward
    • Wrap-up and Q&A
  • 12. Integration History
    • 1994
      • DDE with Ami Pro
    • 1996
      • Notes R4
      • OLE
      • LotusScript
      • VBA
    • 1997
      • SmartSuite with LotusScript (Word Pro)
    • 1998
      • Notes R5 with COM support
    • 2001
      • Notes Domino 6
    • 2004
      • Notes Domino 6.5 with LS2J and DXL
    • 2005
      • Notes Domino 7 with Web services
    • 2007
      • 2007 Office System
      • Lotus Notes/Domino 8
      • Lotus Symphony
    • 2008
      • Visual Studio 2008
      • Notes/Domino 8.5
  • 13. The Good News
    • We have entered the “Industrial Revolution” period of the Integration Era
    • In the “Medieval Times”
      • DDE with Ami Pro
      • NotesSQL was used to get even the most basic of data
      • OLE embedding
      • Notes F/X
  • 14. The Good News (continued)
    • The Renaissance brought us new tools
      • OLE automation
      • COM automation
      • And much more
    • The Revolution brings us major changes
      • A true competitor to Office
      • Visual Studio.NET 2008 and VSTO 3.0
      • Code begins to move from inside a document to complete applications
  • 15. Definitions for Notes Programmers
    • Let’s go over a few words you need to know
      • COM
      • OLE
  • 16. What is COM?
    • Component Object Model
    • Microsoft standard
    • Defines the guidelines for objects
      • Objects must tell all other programs what is supported
        • Properties
        • Methods
        • Objects
    • Consistent, programmatic access to functionality
  • 17. What is OLE?
    • Object Linking and Embedding
    • Another Microsoft standard
    • Allows one application document to include a portion of another application
      • A Word document with an Excel spreadsheet inside
    • OLE/1 — attachments
    • OLE/2 — linking or embedding
  • 18. OLE/1 — File Attachments
    • Advantages:
      • Functionality clearly divided between applications
      • No memory issues
      • Much smaller size footprint
      • Enables template usage
  • 19. OLE/1 — File Attachments (cont)
    • Disadvantages:
      • Requires more planning
      • More effort for basic functionality
      • Attachment does not know about the Notes object
      • Must manually connect and update
    • Notes 6 added the ability to round-trip edit attachments
  • 20. OLE/2 — Linking and Embedding
    • Advantages:
      • Integrated — single interface when using embedded objects (when used in-line)
      • Document containing objects is “aware” of the embedded object
      • Less work to get object open for the user
  • 21. OLE/2 — Linking and Embedding (cont.)
    • Disadvantages:
      • OLE embedded objects are:
        • Much bigger … 10 to 15 times
        • Difficult for users when the object is more than one page
      • OLE embedding was not reliable before Office XP with Windows XP
      • File menu of container application is never updated
    • #1 issue … no clean way to export data from embedded objects
      • “ Locked” data is bad
  • 22. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Integration with Google Docs
    • Reporting Options
    • Real World Integration
    • Looking forward
    • Wrap-up and Q&A
  • 23. Integration from the Notes Client
    • Integrating Microsoft Word
    • Integrating Lotus Symphony Documents
    • Working With Attachments
    • Mail Merge
    • Integrating Microsoft Excel
    • Integrating Lotus Symphony Spreadsheets
    • Integrating Microsoft PowerPoint
    • Integrating Lotus Symphony Presentations
    • Integrating Microsoft Project
  • 24. Integration from Notes
    • From Notes, you will write code to manipulate the application
    • In most cases, you will be converting Visual Basic for Applications (VBA) code to LotusScript
    • The VBA code will be written so it saves in Notes as LotusScript
    • Once you get the knack of converting the code, you can focus on the process vs. the code
  • 25. Creating a Word Document — “Hello World” Demo — Example 1 Launch Microsoft Word and enter some text pe01832_
  • 26. Creating a Word Document
    • Create an instance of the application object
    • All applications that support COM have object names
    • To find the object name:
        • Review the application documentation
        • Look it up in the Windows registry
    • Never use version-specific application object names
        • Good: Word.application
        • Bad: Word.application.11
        • When the application upgrades, you must modify your code
    Variant Application Object Name LotusScript Method Set hwd = CreateObject("Word.Application")
  • 27. Creating a Word Document (cont.)
    • You must follow the application’s object model:
      • Word.application
        • Documents
          • Document
            • Paragraph
            • Bookmark
            • CustomDocumentProperties
    • If accessing the current open document, use:
        • Application.ActiveDocument
        • Application.ActiveWorkbook
        • Application.ActivePresentation
        • etc.
    • All applications have an object map in help
  • 28. The Easiest Way to Start
    • Microsoft Office provides us with a recorder
    • Records all keyboard actions
      • Mouse actions are sometimes recorded, so avoid when possible
    • Generates VBA code for you
    • Easy way to learn how something is done
      • Table is created
      • Page settings are set
      • etc.
  • 29. Recording Actions in Microsoft Word pe01832_ Demo — Example 2 Use the Microsoft Word macro recorder to write VBA for us
  • 30. What’s up with the Recorded Syntax?
    • This is the recorded syntax:
    • Saving LotusScript with wdToggle and wdAlignParagraphCenter fails!
    • Need to replace VBA constants with raw values
      • Write a macro
        • Msgbox [constantname]
    • Or …
  • 31. Use the Microsoft Constants Database
    • Provides a listing of all Microsoft Office variables and their converted constants
    • Extraction of constants by John Collidge
    • Database built by Tom Duff
    • Now an OpenNTF.org project
    • Supports Microsoft Office 2000, XP, 2003, and 2007
    • More features planned!
  • 32. Domino COM Basics
    • Working with the Domino Objects is almost the same as writing code in Notes!
    • Only supports back-end objects
      • No NotesUIDocument, NotesUIView, NotesUIWorkspace, etc.
    • COM support was added in Notes 5.0.2b
    • Updated in 6.5.1 to support 6.X
    • ND7, 8 & 8.5 COM support out of the box
    • COM interface is the same as LotusScript, with some minor exceptions
  • 33. Registering the Notes COM Objects
    • Sometimes Notes does not register itself properly with the Windows registry
      • From the Windows run line:
        • Regsvr32 “c:program fileslotus otes lsxbe.dll”
      • From a Notes agent:
        • Shell(|regsvr32 “c:program fileslotus otes lsxbe.dll”|)
  • 34. Domino COM Basics
    • Before you start writing VBA code, you must load the Domino COM objects
      • In MS Office  Tools  References
  • 35. Domino COM Basics (cont.)
    • The COM objects must be able to find the Notes.ini
      • Looks in:
        • Notes program directory
        • Path
    • KeyFileName in Notes.ini is used to determine what ID to use for authentication
    • Multiple installed versions of Notes are a problem
      • Uses the last installed version
        • HKEY_CLASSES_ROOT.nsfShellOpenCommand
        • HKEY_CLASSES_ROOT otes.exeShellOpenCommand
        • HKEY_LOCAL_MACHINESOFTWARELotusNotes
  • 36. Make Your End Users Happy!
    • Prevent password prompts by …
    Notes 5.X Notes 6 , 7, 8 & 8.5
  • 37. Domino COM Basics
    • Must use “NotesSession.Initialize("" ) ” to establish connection between application and Notes
    • Can not use extended syntax (i.e., dot notation) to reference items in a document
      • NO
        • NotesDocument.Form(0)
      • YES
        • NotesDocument.GetItemValue(“Form”)(0)
  • 38. Domino COM Basics (cont.)
    • Can not use “New” to create Domino objects
      • Exception is NotesSession
      • NO
        • Dim db as New NotesDatabase(server, dbpath)
      • YES
        • Dim db as NotesDatabase
        • Set db = NotesSession.GetDatabase(server, path)
  • 39. Domino COM Basics (cont.)
    • No such thing as a “current” environment or object
      • No CurrentDatabase, DocumentContext, etc.
    • If a property returns an array of objects, you must assign the property to a variable first
      • NO
        • Dim view as NotesView
        • Set view = NotesDatabase.Views(0)
      • YES
        • Dim views as Variant, view as NotesView
        • views = NotesDatabase.Views
        • Set view = views(0)
  • 40. Domino COM Basics (cont.)
    • VB doesn’t use Forall…EndAll
      • Uses For Each…Next, instead
    • VB doesn’t support Today keyword
    • VB doesn’t support using pipes ( | ) and braces ( {} ) for string delimiting
    • Refer to ND Designer Help for more information
  • 41. Word Template — Data from Notes pe01832_ Demo — Example 3 Create a new document Prompt user Place data into document
  • 42. Managing the Template
    • How did I get that template in my new dialog?
    • Template installation tool
      • Each template is a document
      • Supports all Office 2000 through 2007 applications
    • Can also be used as a programmatic template tool
    • Located on OpenNTF.org and on the conference CD
  • 43. Attachments
    • How the user interacts directly with the attachment may be the make or break part of your application
    • Store the attachment in a rich text field
    • Programmatically detach and save the attachment
      • Prevents user error
    • Take advantage of the ND6 and ND7 in place editing functionality
  • 44. Working with the Attachment
    • This code is used to detach an attachment
    • Set attachmentfield = document.getfirstitem(fieldname)
    • If attachmentfield.embeddedobjects(0) Is Nothing Then
    • Msgbox “No embedded objects were found on the document”, 16, “Attachment Demo”
    • Exit Function
    • End If
    • If attachmentfield.EmbeddedObjects(0).Type <> EMBED_ATTACHMENT Then
    • Msgbox “No attachments were found on the document”, 16, “Attachment Demo”
    • Exit Function
    • End If
    • Forall o In attachmentfield.EmbeddedObjects
    • filename = o.source
    • End Forall
    • Set Object = document.GetAttachment(filename)
    • Call Object.ExtractFile (filepath + filename)
    Get the rich text field Extract the attachment Get the object based on the filename Get the filename of the attachment in the field Check for an attachment Check for an object
  • 45. Saving the Attachment
    • Once the code is complete, save the attachment back to the Notes document
    • This will prevent user mistakes
    Dim newrichtextfield As notesrichtextitem Dim newobject As notesembeddedobject newdoc.removeitem (&quot;Attachment&quot;) Set newrichtextfield = newdoc.CreateRichTextItem(&quot;Attachment&quot;) Set newobject = newrichtextfield.EmbedObject(EMBED_ATTACHMENT, &quot;&quot;, filepath + filename)
  • 46. Attachment Demo Demo — Example 4 User form that works with attachments pe01832_
  • 47. Introduction to OpenOffice.org Development
    • Designed on an interface-based component model called Universal Network Objects (UNO)
    • UNO definition
      • 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
      • UNO components can be implemented in, and accessed from, any programming language for which a UNO language binding exists
  • 48. OpenOffice.org? StarOffice? Lotus Symphony?
    • StarDivision StarOffice written in the mid 80s
    • Bought by Sun Microsystems in 1999, StarOffice released in August 1999
    • Source code released October 2000
    • OpenOffice.org 1.0 released May 2002, 2.0 in October 2005
    • OpenDocument format becomes international standard ISO/IEC 26300 November 2006
    • IBM Lotus Workplace Productivity Editors released 2005
      • Based on OpenOffice.org 1.1
    • OpenOffice.org 2.2 released March 2007
    • Notes 8 to include IBM Productivity Tools, based on OpenOffice.org 1.1X
    • Lotus Symphony Beta 1 released in October 2007, Beta 2 in December 2007
    • Lotus Symphony 1.2 stand-alone, included in 8.5
  • 49. What is the ServiceManager?
    • ServiceManager is similar to the NotesSession class
    • It is a factory class that gets you to other places
      • Set SM=CreateObject(&quot;com.sun.star.ServiceManager&quot;)
    • Think of the ServiceManager as a back-end class, and we want the front end (like NotesUIWorkspace)
      • Set Desktop=SM.createInstance(&quot;com.sun.star.frame.Desktop&quot;)
  • 50. What Did That Do?
    • Calling the ServiceManager created an OpenOffice.org window, but we need to do more …
  • 51. Let’s Start Writer — Word Processing Application
    • So far we have an OpenOffice.Org window, but it doesn’t know what application it will be — we have to tell it
      • Dim args()
      • Set WriterApplication=Desktop.loadComponentFromURL (&quot;private:factory/swriter&quot;,&quot;_blank&quot;,0,args)
    • Args is a variant array
      • We don’t want to pass any parameters, but it must be an array
    • The “s” in “swriter” stands for “Star”
    • Now we have a word processor up and running
  • 52. The Picture So Far
    • Now we have an application open
    • Time to do something!
  • 53. Let’s Add Some Text
    • First, we need to get a handle to the text part of the document
      • Set WriterText=WriterApplication.getText()
    • Next, we need a cursor position where we can insert the text
      • Set Cursor=WriterText.createTextCursor()
    • Finally, we can make the traditional greeting
      • Call WriterText.insertString(Cursor,&quot;Hello World!&quot;,False)
  • 54. Hello World!
    • After executing all of the code we walked through, this is the result
    • Now let’s try it for real
  • 55. Notes to Lotus Symphony Documents Demo — Example 5 “ Hello World” from Notes to Lotus Symphony Documents pe01832_
  • 56. Merging Mail from Notes
    • Most requested Notes-to-Office Integration functionality
    • Users have no idea how to get data from Notes into Word
    • Lotus has not provided this functionality … yet
    • Quick win for you — take this code back and add it to your boss’s personal name and address book and be the HERO!
  • 57. Mail Merge in Different Versions of Word
    • Mail merge is version-specific
      • One version for Word 2000 and before
      • One version for Word XP
      • One version for Word 2003
        • Minor change on closing documents in 2003
      • New version for Word 2007
  • 58. Use the Mail Merge Wizard to Your Advantage
    • The Mail Merge Wizard has six steps
      • 1. Select document type
      • 2. Select starting document
      • 3. Select recipients
      • 4. Write your letter
      • 5. Preview your letters
      • 6. Complete the merge
    • You can control which:
      • Wizard steps display
      • Step to start on
  • 59. Mail Merge from Address Book Demo — Example 6 Generate a mail merge from the personal name and address book pe01832_
  • 60. Mail Merge with OpenOffice.org Writer
    • Just like the other applications, mail merge has its own URL
      • Set objMailMerge = objServiceManager.createInstance (&quot;com.sun.star.text.MailMerge&quot;)
    • Mail merge has seven arguments
      • DocumentURL
      • DataSourceName
      • CommandType
      • Command
      • OutputType
      • OutputURL
      • FileNamePrefix
  • 61. Mail Merge with OpenOffice.org Writer (cont.)
    • Set the seven arguments
      • Set args(1) = OOoNamedValue(&quot;DocumentURL&quot;, url)
      • Set args(0) = OOoNamedValue(&quot;DataSourceName&quot;, &quot;mrgdata&quot;)
      • Set args(2) = OOoNamedValue(&quot;CommandType&quot;, 0)
      • Set args(3) = OOoNamedValue(&quot;Command&quot;, &quot;mrgdata&quot;)
      • Set args(4) = OOoNamedValue(&quot;OutputType&quot;, 2)
        • Output has two options
          • 1 = Send to printer
          • 2 = Save to file
      • Set args(5) = OOoNamedValue(&quot;OutputURL&quot;, savelocation)
      • Set args(6) = OOoNamedValue(&quot;FileNamePrefix&quot;, &quot;mailmergeoutput1&quot;)
  • 62. Mail Merge with OpenOffice.org Writer (cont.)
    • Finally, call the Execute method to complete the mail merge
      • objMailMerge.Execute args()
  • 63. Lotus Symphony Documents Mail Merge and Notes Demo — Example 7 Creating a mail merge letter from the Notes personal name and address book pe01832_
  • 64. Integration with Microsoft Excel
    • Working with Excel is very different from Word
    • The objects we use are different
    • In Excel, we tend to move more data from Notes to the application
      • Lots of rows in Excel vs. filling in bookmarks in Word
  • 65. The Beginning with Excel
    • To start, use a different object
      • Set hwd = CreateObject(&quot;Excel.Application&quot;)
    • Next, create a new workbook
      • hwd.Workbooks.Add
    • And it’s time to add data
  • 66. Working with Cells and Ranges
    • We can work with cells or ranges
      • For operating on a specific cell … hwd.cells(1,1).value=“Name”
      • hwd.cells(1,2).value=“Category”
      • For operating on multiple cells … use a range xlRange=&quot;$A$1:$C$1“
      • With hwd
      • .Range(xlRange).Font.Bold = True ' set row to bold
      • .Range(xlRange).Borders.LineStyle=1' set border
      • .Range(xlRange).Borders.Weight=1 ' set weight of border
      • End With
  • 67. Dealing with the Default Row and Column Size
    • Excel does not autosize columns and rows
    • Do it within your code hwd.Range(xlRange).EntireColumn.AutoFit or hwd.Range(xlRange).EntireRow.AutoFit
  • 68. Creating a Chart
    • xlRange=&quot;$A$1:$C$10&quot;
    • hwd.Charts.Add
    • hwd.ActiveChart.ChartType = 51
    • hwd.ActiveChart.SetSourceData hwd.Sheets(&quot;Sheet1&quot;).Range(&quot;A1:C10&quot;), 2
    • hwd.ActiveChart.SeriesCollection(1).Name = &quot;=&quot;&quot;Notes Chart&quot;&quot;&quot;
    • hwd.ActiveChart.Location 2, &quot;Sheet1“
    • With hwd.ActiveChart
    • .HasTitle = True
    • .ChartTitle.Characters.Text = &quot;Notes to Excel Demo“
    • .Axes(1,1).HasTitle = True
    • .Axes(1,1).AxisTitle.Characters.Text = &quot;X Axis“
    • .Axes(2,1).HasTitle = True
    • .Axes(2,1).AxisTitle.Characters.Text = &quot;Y Axis“
    • .ApplyDataLabels 2, True
    • .HasDataTable = False
    • End With
    • hwd.ActiveSheet.Shapes(&quot;Chart 1&quot;).ScaleHeight 1.46, 0,0
    Add the chart from the above range Create the chart on the current sheet Resize the chart to a specific height
  • 69. Working with Microsoft Excel Demo — Example 8 Create a spreadsheet from Notes data and generate a chart pe01832_
  • 70. Let’s Start Lotus Symphony Spreadsheets
    • Calc uses a different URL to define the application
      • Set CalcApplication = Desktop.loadComponentFromURL_(&quot;private:factory/scalc&quot;,&quot;_blank&quot;,0,args)
    • The command above creates the workbook
    • Next, we need to get the first sheet
      • Set Worksheet=CalcApplication.Sheets.getByName(&quot;Sheet1&quot;)
  • 71. Let’s Start Lotus Symphony Spreadsheets (cont.)
    • Finally, we access the cell into which we want to enter text
      • Set cell=Worksheet.getCellByPosition(3,6)
    • We have set the string in a cell, but which cell is it?
  • 72. Notes with Lotus Symphony Spreadsheets Demo — Example 9 “ Hello World” with Notes and Lotus Symphony Spreadsheets Where will the text go? pe01832_
  • 73. Notes with Lotus Symphony Spreadsheets — D7!
    • Why did the text go into cell D7? Didn’t we write to cell (3,6)?
  • 74. Rows and Columns Are Numbered from Zero
    • Just like arrays in Notes, the index starts at 0!
  • 75.
    • PowerPoint is closer to Word than Excel
    Integration with Microsoft PowerPoint
  • 76. The Beginning with PowerPoint
    • To start, use the PowerPoint object
      • Set hwd = CreateObject(″PowerPoint.Application&quot;)
    • Next, create a new presentation
      • hwd.Presentation.Add 1, 1
    • And it’s time to add data
  • 77. Working with PowerPoint Shapes
    • Every slide has shapes
      • Title text box
      • Bullet text box
      • etc.
    • Each shape has a name
      • Finding the name is typically “hunt and peck”
      • I always use the macro function to determine the shape name
      • You can also write a macro
  • 78. Working with Shapes
    • You have to navigate to enter text in PowerPoint
      • Shape
      • TextFrame
      • Characters
      • Selection
    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
  • 79. Working with PowerPoint Demo — Example 10 Create a presentation using contacts or sessions pe01832_
  • 80. Introduction to Lotus Symphony Presentations
    • Impress and Draw are almost the same application
    • Pages contain shapes
    • Shapes can contain text
    • Text is handled just as it is in Lotus Symphony Documents
  • 81. Let’s Start Lotus Symphony Presentations
    • To create the instance of Impress, call its URL
      • Set ImpressApplication=Desktop.loadComponentFromURL_ (&quot;private:factory/simpress&quot;,&quot;_blank&quot;,0,args)
    • Next, call the getDrawPages function to create the default presentation
      • Set Presentation=ImpressApplication.getDrawPages()
    • To get the first slide, use the getByIndex method
      • Set Slide=Presentation.getByIndex(0)
  • 82. Let’s Start Lotus Symphony Presentations (cont.)
    • Each layout type has its own number
      • To create a title page, enter the following:
        • Slide.layout=1
    • Finally, we need to get the title and handle it like it’s a Lotus Symphony Documents text object
      • Set title=Slide.getbyindex(0)
      • Set TitleText=title.getText()
      • Set Cursor=TitleText.createTextCursor()
      • Call TitleText.insertString(Cursor,&quot;Hello World!&quot;,False)
  • 83. Lotus Symphony Presentations & Notes - Result
  • 84. Lotus Symphony Presentations and Notes Demo — Example 11 “ Hello World” with Notes and Lotus Symphony Presentations pe01832_
  • 85. Integration with Microsoft Project
    • Microsoft Project’s COM API is the “hardest” of all the Office applications
    • Syntax is very different
    • There is no mapping between the other applications and Project
  • 86. Beginning with Project
    • To start, use the Project object
      • Set hwd = CreateObject(″msproject.Application&quot;)
    • Next, create a new Project file
      • Call msproject.filenew(False, &quot;&quot;, False, False)
    • And it’s time to add data
  • 87. Adding Notes Data to Project
    • To start, add data to specific rows in Project
    • You must also specify the field
      • Call msproject.settaskfield(&quot;Name&quot;, doc.subject(0), False, True, 1)
    • Once you have filled all the fields for the row, select the row to move the cursor
      • Call msproject.selectrow(projidcount, False, 1)
  • 88. Microsoft Project Demo — Example 12 Create an MS Project plan using tasks or sessions pe01832_
  • 89. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Integration with Google Docs
    • Reporting Options
    • Real World Integration
    • Looking forward
    • Wrap-up and Q&A
  • 90. What We’ll Cover …
    • Microsoft Word and Web services
    • Microsoft Excel and XML
    • Microsoft InfoPath and Web services
    • .NET and Lotus Notes/Domino
    • Visual Studio tools for Office
  • 91. Moving to the Other Side
    • This part covers the more advanced subjects
      • Such as automating Lotus Notes from Microsoft Office and other technologies
      • We will use COM, XML, Web services, and .NET technologies
      • As the title suggests, this part is more technical We are about to pick up the pace
  • 92. Automation from the Microsoft Side
    • Many integration scenarios require that user interaction start, or solely be, from an application other than Notes
    • Many times we will not have the Notes client installed
    • We will not be writing LotusScript
      • We may call LotusScript through the Notes COM interface
    • We need to take advantage of “new” technologies
      • XML
      • Web services
      • .NET
      • Managed code
  • 93. About Web Services
    • Self-contained application published and invoked from the Web
    • Based on XML
    • Uses WSDL and SOAP
    • Designed for machine-to-machine interaction
    • Advantages:
      • Connects various applications running on different platforms
      • Uses open standards and protocols
      • Uses HTTP, bypassing firewall and other security measures
    • Disadvantages:
      • Poor performance as opposed to Distributed COM (DCOM)
      • Requires an internet connection for both the client and the server
  • 94. First Things First
    • First, you need to build a Web service
    • It can be written using LotusScript, Java, or importing WSDL
    • It is very similar to an agent
    • To be able to write a Web service, you must know how to write a class
    • If you are working with Notes 6.5 or before, you can build an agent and “fake” it into being a Web service
  • 95. Web Service Classes
    • Example of a simple LotusScript custom class:
    • Class GetPersonInfo
    • Sub New
    • End Sub
    • Public Function GetEmailAddress(personname As String) As String
    • End Function
    • Public Function GetPhoneNumber(personname As String) As String
    • End Function
    • End Class
    • Just like an agent, except the New function
      • Acts just like the agent Initialize
  • 96. Lotus Developer Sessions Web Service
  • 97. Calling a Web Service from Microsoft Word
    • To call a Web service from Word (or other Office application), use the following code:
    • SWSDL = &quot;http://www.johndavidhead.com/ls08sessions.nsf/SessionInfo?wsdl&quot;
    • Set Client = CreateObject(&quot;MSSOAP.SoapClient&quot;)
    • Call Client.mssoapinit(sWSDL)
    • GetSessionList = Client.ListAllSessions
    • This code uses the SOAPClient control that is part of Windows and Internet Explorer
    • SOAP is a way to package and interact with a Web service
  • 98. More Detailed Web Services with Word
    • Now, we want to take something the user selected and get more info about it
    • This is a second method in the Web service:
    • Public Function GetSessionFieldValue(sessionid, fieldName) As String
    • sWSDL = &quot;http://www.johndavidhead.com/advisorsession042006.nsf/SessionInfo?wsdl&quot;
    • Set Client = CreateObject(&quot;MSSOAP.SoapClient&quot;)
    • Call Client.mssoapinit(sWSDL)
    • GetSessionFieldValue = Client.GetSessionInfo(sessionid, fieldName)
    • End Function
    • Sessionid and fieldName are values we pass into the Web service
    • The return value comes back as string
  • 99. Word 2007 and Web Services
    • Word template that prompts the user
    • Prompted information is from a Notes database
    • Instead of using COM, data is obtained via Web services
    • Code written inside the Visual Basic for Applications Integrated Development Environment (IDE)
  • 100. pe01832_ Demo — Example 13 Word template that reads a Notes database via a Web service
  • 101. Office and XML Details
    • Office 2003 added XML support
      • Word and Excel
      • Export-like Save option
    • Excel can import data from an XML file
    • Import XML schema
    • Transform XML with XML style sheets
  • 102. Office and XML Details (cont.)
    • Office 2007 uses XML as the default new file format
    • Microsoft is working to make the new XML file format an ISO standard
      • Called Open XML
    • Office 2003 can open these new formats with an update you can download from Microsoft
    • Learn more about OOXML, ODF in John's Best Practices Session
      • BP305: The Document Format Dance
  • 103. Working with Domino Data as XML
    • Use the core Domino classes
      • LotusScript and Java
    • Domino XML (DXL)
    • Cheat 
      • Add passthru HTML to a form
      • Build your own agent to output XML
  • 104. A Domino Agent That Creates XML
    • Dim s As New NotesSession
    • Dim db As NotesDatabase
    • Dim doc As NotesDocument
    • Dim view As NotesView
    • Set db = s.currentDatabase
    • Set view = db.GetView( &quot;XML&quot; )
    • Set doc = view.GetFirstDocument
    • Print &quot;Content-type: text/xml“
    • Print &quot;<BOOKCATALOG>“
    • While Not ( doc Is Nothing )
    • Print &quot;<BOOK>&quot;
    • Print &quot;<bookTitle>&quot;+doc.bookTitle(0)+&quot;</bookTitle>“
    • Print &quot;<bookAuthor>&quot;+doc.bookAuthor(0)+&quot;</bookAuthor>&quot;
    • Print &quot;<bookPrice>&quot;+doc.bookDiscountPrice(0)+&quot;</bookPrice>&quot;
    • Print &quot;<bookCategory>&quot;+doc.bookCategory(0)+&quot;</bookCategory>&quot;
    • Print &quot;</BOOK>&quot;
    • Set doc = view.GetNextDocument( doc )
    • Wend
    • Print &quot;</BOOKCATALOG>&quot;
  • 105. How Domino Data Looks as XML
  • 106. Using XML with Excel
    • Read XML from a Notes database
    • XML generated via an agent in Notes database
    • Chart the data using Excel charting tools
    • Works with Domino 5.X, 6.X, 6.5.X, 7, 8, & 8.5
    • For this example, we will not write any code!
  • 107. Microsoft Excel and XML pe01832_ Demo — Example 14 Importing Domino data into a spreadsheet using XML
  • 108. .NET and Lotus Notes/Domino
    • The .NET CLR acts like a Java Virtual Machine (JVM) for running code
      • CLR = Common Language Runtime
    • It provides a single point for:
      • Security
      • Access/registration of objects
      • Management
      • Logging
    • .NET added “managed code”
      • Code that is managed, runs
      • Code that is not managed is stopped
  • 109. Managed Code
    • .NET managed code must be signed
    • Visual Studio .NET can sign the code
    • Certificates much like the VBA code signatures
    • You can get one from VeriSign and other companies
      • Free if it’s for internal use only
      • Purchasable if you want to sign code and ship it
  • 110. Managed Code and Domino
    • Why does a Domino developer care?
    • By default, COM is considered unmanaged and unsigned to the .NET Common Language Runtime (CLR)
    • Managed code also prevents .NET components from being called by COM
    • You can create COM Callable Wrappers (CCW) in Visual Studio .NET
  • 111. Generating COM Callable Wrappers
    • Steps to build a .NET component so that it can be used from COM:
      • Sign the assembly with a strong name
      • Build the .NET assembly (component)
      • Register the .NET component as a COM object
      • Optional:
        • Add attributes to the .NET code that give more control of the COM interface that is generated
  • 112. Visual Studio .NET
    • Introduced in 2002
    • Provides the default Microsoft Development Environment
      • Design goal is to be the only IDE for Microsoft software
    • Supports multiple languages
      • VB .NET
      • C#
      • etc.
    • Supports WinForms
    • Uses .NET security
  • 113. Visual Studio Tools for Office 2005
    • Add-in for Visual Studio .NET
    • Adds support for:
      • Word
      • Excel
      • InfoPath
      • Outlook
    • Can develop in:
      • Visual Basic
      • C#
  • 114. Word with VSTO
    • Same demo as the Word 2007 Web services demo
    • Built in VS .NET using VSTO 2005
    • Uses the Word template that comes with Visual Studio Tools for Office (VSTO)
    • The Web service is created using the VS .NET Web Service Connector tool
  • 115. Microsoft Word and VSTO 2005 pe01832_ Demo — Example 15 Creating a new Word document that prompts the user and fills out Domino data via a Web service
  • 116. Visual Studio .NET 2005
    • Supported applications and templates
  • 117. Microsoft Visual Studio 2005 Tools for Office Second Edition Runtime
    • Supports Office 2007
    • Free download from Microsoft Developer Network
    • Only supports add-ins
      • No document or template Templates
    • More applications supported
    • Stopgap support for Office 2007 until VS .NET 2008
  • 118. Visual Studio .NET 2005 Second Edition Templates
    • For Office 2007, here are the supported Add-ins:
  • 119. VS .NET 2005 SE and Domino Data
    • Session evaluation sample used in the Word and Web services and VS .NET 2005 demos
    • Rebuilt for Word 2007
    • Uses a side panel add-in to prompt the user to select some data
  • 120. 2007 Microsoft Office System Logical Architecture
  • 121. Visual Studio.NET 2008 and VSTO 3.0
    • VSTO is no longer a separate download
    • Support for Office 2003 and 2007
    • Ribbon Designer
    • Template Options mimic other VS.NET projects
  • 122. VSTO 3.0 Project Types http://www.danielmoth.com/Blog/NewO11ProjectB1.jpg http://www.danielmoth.com/Blog/NewO12ProjectB1.jpg
  • 123. Office 2007 Server-Side Options
    • Microsoft SharePoint Services 3.0
    • Microsoft SharePoint 2007
    • Microsoft ASP.NET 2.0
    • Microsoft Excel Services
    • Microsoft Office Groove
  • 124. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Integration with Google Docs
    • Reporting Options
    • Real World Integration
    • Looking forward
    • Wrap-up and Q&A
  • 125. Ways to Add Domino Functionality to ASP.NET
    • Using Notes/Domino’s COM interface
    • Using Domino Web services
    • Using Domino Web agents and XML
    • NOTE: Selecting the right option is dependent on the Domino Server version and the developer’s skill
  • 126. Domino COM in ASP
    • From within Visual Studio .NET, using the ASP.NET template
    • Add the Domino COM reference like we have done in Office and VSTO
    • Build the ASP.NET page
  • 127. Building the ASP.NET Page
    • Add the standard fields and labels to the ASP page
    • The COM code is behind the button
  • 128. Calling Domino via COM in ASP.NET
    • Below is the code behind that button:
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim s As New Domino.NotesSession Dim dbdir As Domino.NotesDbDirectory Dim db As Domino.NotesDatabase Try s.Initialize() ‘ you can also use s.Initialize(&quot;password&quot;) dbdir = s.GetDbDirectory(&quot;&quot;) db = dbdir.OpenDatabase(TextBox1.Text) Label1.Text = db.Title Label2.Text = db.FileName Label3.Text = db.FilePath Label4.Text = db.ReplicaID Label5.Text = db.Size Label6.Text = db.Created Label7.Text = db.LastModified Catch ex As Exception Label1.Text = (&quot;An Error Happend &quot; & ex.Message & “ “ & ex.Source) Finally System.Runtime.InteropServices.Marshal.ReleaseComObject(s) End Try End Sub
  • 129. ASP.NET Calling Domino via COM Demo — Example 16 Creating an ASP.NET Web page that calls Domino via COM pe01832_
  • 130. ASP.NET Calling a Domino Web Service
    • We can call the same Domino Web service we have used before
    • ASP.NET will import the Web service
    • Code behind the button will be virtually the same as when ASP.NET called Domino via COM
  • 131. ASP.NET Calling Domino via a Web Service Demo — Example 17 Creating an ASP.NET Web page that calls Domino via a Web service pe01832_
  • 132. ASP.NET Can Also Work with Domino XML
    • ASP.NET can display Domino data in a great grid control
    • Steps to make this happen:
      • Drag a GridView data control onto your page
      • An XMLDataSource object is automatically added
      • The XMLDataSource is associated with the GridView control
      • Set the DataFile property of the XMLDataSource to the XML agent
  • 133. Domino Data in a Grid on an ASP.NET Web Page
    • This is what the data will look like in the grid control:
  • 134. Displaying Domino XML in an ASP.NET Web Page Grid pe01832_ Demo — Example 18 Creating an ASP.NET Web page that uses the grid control to display Domino XML
  • 135. Microsoft SharePoint Integration
    • Integration at the Notes client
      • Mainsoft Sharepoint Integrator
    • Integration with Domino data
      • A combination of
        • VSTO
        • Domino XML
        • Some magic :-)
        • Samples inspired by Gary Devendorf @ Microsoft
  • 136. Microsoft SharePoint Ingetration pe01832_ Demo — Example 19 Posting documents created via Automation to Microsoft SharePoint
  • 137. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Integration with Google Docs
    • Reporting Options
    • Real World Integration
    • Looking forward
    • Wrap-up and Q&A
  • 138. Google Docs Integration
    • Higher degree of difficulty
    • Java code integrated with the Notes 8 and 8.5 Standard Clients
      • Eclipse.org plug-ins
    • A sidebar application that displays the documents
      • Just like Quickr!
    • This sample is not for the timid!
    • There is also a C# library available
  • 139. Google Docs Integration – Posting Documents pe01832_ Demo — Example 20 Saving Documents from Notes to Google Docs
  • 140. Google Docs Integration – Domino Data in Spreadsheet pe01832_ Demo — Example 21 Using Domino Data via RSS feed in Spreadsheet
  • 141. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Integration with Google Docs
    • Reporting Options
    • Looking forward
    • Wrap-up and Q&A
  • 142. Reporting Options
    • Use Excel/Calc
    • Use a third-party tool
  • 143. Five Third Party Tools Available
    • Crystal Reports
    • IntelliPRINT Analytics/Reporting
    • SWING
    • SQL Reporting tools via DB2NSF
    • Integra4Notes/Integra Quick Reports
  • 144. Integra4Notes and Integra Quick Reports
    • Integra4Notes
      • A Notes application that allows importing and exporting of data between Lotus Notes and Word, Excel, PDF files, and XML files
      • The premier reporting framework for Notes developers
    • Integra Quick Reports
      • Ad hoc reporting for end users to Microsoft Excel
      • Mail merge and labels to Microsoft Word
      • From any Lotus Notes database
  • 145. Integra4Notes Key Features and Benefits
    • More advanced capabilities
      • Event-driven script, for example
      • Access multiple databases and sources
        • Oracle, SAP, mySQL, etc.
    • Non-intrusive — no designer changes
    • Zero footprint — no EXE, no DLLs, etc.
    • Distribute via email, save to Notes document, send doclinks, send to printer, fax, etc.
    • Notes client, browser, and scheduled
    • Export and import
    • Generate PDFs
      • 4.5 ships with print driver – no extra cost
  • 146. Third-Party Application Demonstration Demo — Example 22 Integra4Notes and Integra Quick Report samples pe01832_
  • 147. Integra for Notes Personal Edition
    • Provides the user with integration for their Contacts to do the following:
      • Mail Merge
      • Labels
      • Mass Email
      • Export to Excel
      • Ad-hoc export to Excel with Pivot Tables and Charting
    • Supports Notes 6.5, 7, 8, & 8.5
    • Supports Office 200 thru 2007
    • FREE!!!!!!!
    0.D00.gif www.integra4notes.com/personal
  • 148. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Reporting Options
    • Real World Integration
    • Looking forward
    • Wrap-up and Q&A
  • 149. Real World Integration
    • Real World Use Cases
    • Zain Africa Challenge Application
      • www.zainafricachallenge.com
    • PSC won the 2009 Best Philanthropic Lotus Award for this solution
    • Integration Samples
      • Excel for reporting
      • Word for Scripts
      • Integra for XML export
  • 150. Agenda
    • Who we are?
    • Integration Background
    • Integration from the Notes client
    • Integration from other applications
    • Integration from a web browser
    • Reporting Options
    • Real World Integration
    • Looking forward
    • Wrap-up and Q&A
  • 151. 2009 and Beyond
    • We finally have great tools
      • VS.NET 2008
    • We have multiple options
      • Office, Symphony, OpenOffice.org, Google Docs, etc.
    • The Document Format Decision
      • You will be forced into making a decision in the next 24 months
    • Competition will be good for us … if we can deal with all the changes
  • 152. Sessions you should see this week
    • BP110: IBM Lotus Symphony and You - A Developer's Perspective
      • John Head
      • Loction TBD
    • BP305: The Document Format Dance
      • John Head
      • Location TBD
    • BP111: Reports, Charts, and Graphs 2.0
      • Julian Robichaux & Rob McDonagh
      • Location TBD
  • 153. Resources
    • LDD Discussions (Notes.Net) http://www-130.ibm.com/developerworks/lotus
    • OpenOffice.org http://www.openoffice.org
    • OpenOffice Developers Guide http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html
    • Programming OpenOffice with Visual Basic http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html
    • John Head’s blog http://www.johndavidhead.com
    • Slides and content available from http://www.johndavidhead.com http://www.psclistens.com
  • 154. Resources (cont.)
    • Microsoft Office developer’s Web site
      • http://msdn2.microsoft.com/en-us/office/default.aspx
    • Microsoft Developer Network
      • http://msdn.microsoft.com
    • Microsoft Office blog listing
      • http://msdn2.microsoft.com/en-us/office/aa905342.aspx
    • OpenNTF.org — the open source Web site for Notes
      • www.openntf.org
    • Integra4Notes Web site
      • www.integra4notes.com
    • PSC’s Reporting and Office Integration page
      • www.psclistens.com/enTouchCMS/app/viewCategory? catgId=66
  • 155. Thank You! Questions & Answers Please remember to fill out your evaluation. Samples available from www.johndavidhead.com [email_address] [email_address] www.johndavidhead.com www.psclistens.com
  • 156. Legal disclaimer
    • © IBM Corporation 2008. All Rights Reserved.
    • The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.
    • References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.
    • IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino and Lotusphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.