Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1593
  • Last Modified:

Sending doclink to outlook

I need to send an automated email with a doclink to an outlook user. If I paste a copied doclink to an email and send, this works fine in outlook and opens the document but I can't seem to get it to go as a link within an automated notes mail
0
Mel_g
Asked:
Mel_g
  • 7
  • 3
2 Solutions
 
HemanthaKumarCommented:
You can send .ndl file which is equivalent to Copy doc as link and paste the content into a notepad and save it as .ndl file. When you double click it will launch the document by opening notes... this is ok if the user is in same organization as the sender and he/she uses Lotus Notes.. Which I think is not what you would like to have..

So to keep it simple, enable your domino server as http server and send the document link as url in the mail memo.. then user who receives the mail can click on the link to open to the doc on your domino server

~Hemanth
0
 
HemanthaKumarCommented:
Well if you believe that he can open the doc link from outlook, then it is easy.. send him notes url link rather than http url link

eg:

notes://Servername/DatabasePath/0/DocumentUniqueID

This will act similar to doc link
0
 
Mel_gAuthor Commented:
the user is in the same organisation and does have notes. I don't know how to create the ndl file and attach it within notes formula or script.
I have tried sending a url link bit only get the text of the link sent not an actual link
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
HemanthaKumarCommented:
If the user doesn't have notes he cannot open doc link nor notes:// links.. As these two functions rely on notes to be installed in local client.

Only other option is to send him http link

The link should always start with http://  , eg;

http://ServerName/DatabasePath/0/DocumentUniqueID

This will enable a clickable link on outlook
0
 
Mel_gAuthor Commented:
the user DOES have notes - how can I get the notes link to end up as a link?
0
 
HemanthaKumarCommented:
Sorry I misread Does have as doesn't have

Here is the script which creates a ndl file

The CreateNDL function creates an array with the NDL file lines in it -
refering to Doc.
The SaveNDL sub saves the NDL file on the disk - them you can attach the file
manualy or with script.

Example program:
call saveNDL( "c:\link.ndl", CreateNDL( doc ))



Function CreateNDL( doc As NotesDocument ) As Variant
Dim db As NotesDatabase
Dim NDL() As String
Set db = doc.ParentDatabase


Redim NDL( 10 )
NDL( 0 ) = "<NDL>"
NDL( 1 ) = "<REPLICA " & Left$( db.ReplicaID,8 ) & ":" & Right$(
db.ReplicaID, 8 ) & ">"
NDL( 2 ) = "<NOTE " & "OF" & Mid$( doc.UniversalID,1,8 ) & ":" & Mid$(
doc.UniversalID,9,8 ) & "-ON" & Mid$( doc.UniversalID,17,8 ) & ":" & Mid$(
doc.UniversalID,25,8 ) & ">"
NDL( 3 ) = "<HINT>" & db.Server & "</HINT>"
NDL( 4 ) = "</NDL>"

CreateNDL = NDL
End Function


Sub saveNDL( filename As String, NDL As Variant )
Dim NDLFile As Integer
NDLFile = Freefile

Open filename For Output As NDLFile
For i = 0 To Ubound( NDL )
Print #NDLFile, NDL( i )
Next
Close
End Sub

0
 
HemanthaKumarCommented:
If you have notes 5 and above installed properly, then outlook would recognize notes:// as link.. If not then you might have to do some reg setting changes..
0
 
HemanthaKumarCommented:
This is the reg settings

[HKEY_CLASSES_ROOT\notes]
@="URL:Notes Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\notes\DefaultIcon]
@="Path to the notes.exe"

[HKEY_CLASSES_ROOT\notes\Shell]

[HKEY_CLASSES_ROOT\notes\Shell\Open]

[HKEY_CLASSES_ROOT\notes\Shell\Open\Command]
@="C:\\Notes\\notes.exe %1"

0
 
Mel_gAuthor Commented:
Thats great - I now have my ndl file which gives me my link but I can't seem to find how to attach it to my mail automatically
0
 
HemanthaKumarCommented:
Give me the script which does mail send ?

0
 
qwaleteeCommented:
Teh following creates a very simple e-mail with a file attached, which could be an NDL file:

Dim FILE_NAME as string, ADDRESS as string
FILE_NAME = "C:\xyz\some.ndl"
address = someone@somewhere.com"
Dim s as new notesSession
Dim mail as notesDocument
Set mail = s.currentDatabase.createDocument
mail.Form = "Memo"
mail.Subject = "Test"
mail.SendTo = ADDRESS
Dim body as notesRichTextItem
Set body = mail.createRichTextItem("Body")
body.embedObject EMBED_ATTACHMENT,,FILE_NAME
mail.send false
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now