 |
| |  |
Home In This Issue Email a Friend EasyPrint
 | |
|
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
|
[ Prev | Next ]
|
|
-- Advertisement --
AUTOMATE LOTUS NOTES USER ID MANAGEMENT
ID Manager 4.5 from HELP Software provides a new level of automaton for managing Lotus Notes IDs. ID Manager lets Lotus Notes administrators get out of the business of creating and managing user IDs. Use our ROI calculator to see how quickly ID Manager will pay for itself.
Learn more about HELP Software products |
-- Advertisement --
How good are your Notes Reports?
Integra for Notes provides high value reporting and data analysis from Lotus Notes databases using Microsoft Word, Excel and PDF files.
- Enhance traditional static reports with Excel data analysis, pivot tables, macros
- Report from any Lotus Notes databases without changes to database design
- Runs reports through a Lotus Notes client and a web browser
- Enables Report scheduling or distribution by e-mail, printing or storing in a Notes database
- Allows use of LotusScript for advanced data manipulation
Enables self service reporting capabilities to end-users.
Click For More Info. |
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
|