Search DominoPower's 11,429 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
How to make Lotus Notes and Microsoft Outlook/Exchange work together seamlessly (continued)

There have been a few examples of sending Outlook Mail with a doclink around some of the discussions, so I'll write an example that adds an Outlook Calendar Entry with Lotus Notes Document field data, and a link back to the document. Please keep in mind that the field names I refer to are the fields in my sample application.

A Lotus Notes doclink contains all the information you need to find the document across your network. This is the content of a Lotus Notes doclink:

<NDL>
<REPLICA 8525681F:0043D9C5>
<VIEW OFAA9D6A37:688AF3AB-ON8525681F:0043DA1C>
<NOTE OFF2AC8FF6:29F86386-ON8525681F:00484A80>
<REM>Database 'Outlook MS Office Automation', View 'Main', Document 'This is the subject'</REM>
</NDL>

You can right click your mouse on a Lotus Notes document, select Copy as Link, and paste it into Notepad. Save it as filename.ndl, and use the file as a Lotus Notes doclink from any Windows application.

This is how you would build a doclink in that format with LotusScript:

Sub Initialize
' Declare all the Notes variables
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession '
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim docID As String
Dim ReplicaID As String
Dim HintServer As String
Dim ViewID As String
Dim NoteID As String
Dim Sto As String
Dim Cto As String
Dim Subject As String
Dim addsub As String
Dim Body As String
Dim addbody As String

Now get a handle on the current Lotus Notes document.

Set db = session.CurrentDatabase
Set uidoc = ws.Currentdocument
Set doc = uidoc.document

The document must first be saved. Let's check.

If doc.IsNewNote Then
Msgbox "This document has not been saved." & Chr$(10) & Chr$(10) & "Please save prior to mailing link!", 4112, "New Document"
Exit Sub
Else
' Lets get the documents ID
docID = doc.UniversalID
End If
The links to a local database won't work. Let's find out why.

If db.server = "" Then
Msgbox "You are not allowed to send a link of a local database", 4112, "Local Links Not Allowed"
Exit Sub
Else

Now create a replica line for the link.

ReplicaID="<REPLICA " & Left$(db.ReplicaID, 8) & ":" & Right$(db.ReplicaID, 8) & ">"
End If

ViewID = ""

You'll need a default view in the database for the link to work. Let's check for one.

Forall x In db.Views
If x.IsDefaultView Then

Now build a view line for the link.

ViewID = "<VIEW OF" & Left$(x.UniversalID, 8) &":"&Mid$(x.UniversalID, 9, 8)&"-"&"ON"&Mid$(x.UniversalID, 17, 8)&":"&Right$(x.UniversalID, 8)&">"
Exit Forall
End If
End Forall


« Previous  ·  1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Strategies > Email Management (60 articles)
   Using the Notes Client with Gmail
   Using the Notes client with Hotmail (or not)
   Is English-only a viable mail management strategy?
Home > Microsoft Technologies > Exchange (7 articles)
   Is Notes/Domino 8.5 better than Exchange/Outlook 2007?
   When the email flood inundates the Domino Server
   Why I STILL recommend Domino over Exchange
Home > Lotus Technologies > Notes (84 articles)
   A walk down Memory Lane with Lotus Notes
   An application for scanning physical mail and distributing it virtually
   Managing Notes deployments with Teamstudio Build Manager
Home > Lotus Technologies > Domino (77 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   Sloppy analysis at the core of another Domino vs. SharePoint report
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
IBM Lotus to Google Apps Migration Remorse
Webcast Series: Mobile Collaboration with Lotus Software
Domino Login Control for Mobile Apps
Sys Admin Tips March 2010
Quickr place Superusers
Writing Client-Side Javascript for Re-Use
Lotus Notes R8.5.1: Bug in Contacts "Print Selected View"
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login