Domino 9 und frühere Versionen > Entwicklung

How can make an update on a doc link ?

<< < (3/4) > >>

Rob Green:
i dont know personally this guy, so i cant tell if he´s just a faker or not.    :-\

ata:
... to do it by hand:

1. Copy the document as DocLink
2. Open your editor and paste your clipboard
3. Save the file with the extension ".ndl"
4. Attach the file in your document

... to do it with an agent:

Create a button in the document that does:
@Command([EditMakeDocLink]) ;
@Command([ToolsRunMacro]; "SendNDL")

Here is the "SendNDL" Agent:

'[Options]
Option Public
Public Const CF_TEXT = &H001

'[Delcarations]
Declare Function OpenClipboard Lib "User32.dll" Alias "OpenClipboard" (Byval hWnd As Long) As Long
Declare Function GetClipboardData Lib "User32.dll" Alias "GetClipboardData" (Byval wFormat As Integer) As String
Declare Function CloseClipboard Lib "User32.dll" Alias "CloseClipboard" ( ) As Long

'[Initialize]
Sub Initialize
Dim Status As Long
Dim ptr As Long, ghand As Long,handle As Long
Dim Text As String
Dim SendTo As String

Dim s As New notessession
Dim db As NotesDatabase
Dim doc As notesDocument
Dim rtitem As NotesRichTextItem

Set db = s.currentdatabase
Set doc = db.CreateDocument()

' Control of platform 16/32-Bit
If Instr(s.platform,"16") Then
Messagebox ("Wrong Windows-platform; this agent runs only under Windows NT/95")
Exit Sub
End If

' open clipboard
Status = OpenClipboard(handle)
If Status <> 0 Then
' reading clipboard contents
Text = GetClipboardData(CF_TEXT)
Status = CloseClipboard()
Else
Messagebox ("Error opening the clipboard!")
Exit Sub
End If

'Create .ndl file
File = s.GETENVIRONMENTString("Directory",True) &"\link.ndl"
iFileNumber = Freefile
Open File For Output As iFileNumber
Print #iFileNumber, Text
Close #iFileNumber

'Send message
doc.Form = "Memo"
doc.SendTo = "address@email.com"
doc.Subject = "Test NDL"
Set rtitem = doc.CreateRichTextItem("Body")
Call rtitem.EmbedObject ( EMBED_ATTACHMENT, "", File)
doc.send True
Kill File

End Sub

... Thats it => i found it in eknori'es Schatzkiste...

ata

Toma Bogdan:
interesting....

ata:
... if you search in the notes.net forum by ".ndl" you will find a statemanet, where the syntax of all the parameters is declared...

Is it a way for you?

ata

ata:
... i forgot...

... if you know the syntax of this text-file, you can create one - this works on other platforms than "Windoof" too...

ata

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln