Das Notes Forum

Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: pippo am 15.04.03 - 10:19:15

Titel: GetAttachment
Beitrag von: pippo am 15.04.03 - 10:19:15
Hallo Leute,

stehe total auf der Leitung!!!

mit GetAttachment kann man doch einen Dateianhang ansprechen.

wie kann ich diesen starten?

Grüße, Pippo
Titel: Re:GetAttachment
Beitrag von: ata am 15.04.03 - 10:27:05
... von was redest du - Formel oder Script...

... ich vermute Formel - oder?

ata
Titel: Re:GetAttachment
Beitrag von: pippo am 15.04.03 - 10:27:57
hallo ata,

script

Grüße
Titel: Re:GetAttachment
Beitrag von: ata am 15.04.03 - 10:42:54
... alles andere als trivial - mit normalen Bordmitteln gibt es keinen Weg Attachments direkt zu starten - zumindest nicht für alle Plattformen...

ata
Titel: Re:GetAttachment
Beitrag von: pippo am 15.04.03 - 10:45:46
das kann doch nicht sein???

was ist denn damit?

Set handleV = notesEmbeddedObject.Activate( show )

To set: notesEmbeddedObject.RunReadOnly = flag

Grüße, Pippo
Titel: Re:GetAttachment
Beitrag von: Rob Green am 15.04.03 - 10:47:54
eknori hat was, allerding nicht Freeware für kommerzielle Zwecke :

http://www.eknori.de/downloads.htm
http://www.eknori.de/downloads/reattach.zip
(löst ein Attachment auf Platte, startet Applikation anhand Endung)

oder aus LDD:
The most obvious answer is the Auto Launch feature in Form properties. That gives you the option of automatically launching the first attachment.

However, if like me, this doesn't exactly suit your purpose, you could try calling Windows directly. This is what I have been doing, and it works well on both W95/98 and NT4. (I've never tried in on W2000 though). I copy the attachment to disk (using NotesEmbeddedObject.ExtractFile) then use the following code to effectively "double-click" it in Windows.

In the declarations section of the script library put:

Declare Function ShellExecuteA Lib "shell32.dll" Alias "ShellExecuteA" (Byval parent As Integer, _
Byval Operation As String, Byval FileName As String, _
Byval parameters As Long, Byval directory As String, Byval showCmd As Integer) As Integer

The function code is as follows:

Sub wc_LaunchFile(path As String, filename As String)
'Parameters:
' path, the path of the file to be opened
' filename, the filename of the file to be opened
'Purpose:
' To call Windows directly to open the given file using its registered application

'Note: SW_MAXIMIZE = 3
ierr& = ShellExecuteA (&H0, "open", filename, &H0, path, 3)
'Note: any values less than or equal to 32 are errors
If (ierr& >= 0 And ierr& <= 32) Then
Msgbox ("wc_LaunchFile: Error trying to open file. Error code = " + Cstr(ierr&))
End If

End Sub

I hope this is useful.
Max

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/c10dad91055d78f085256973005ca4e9?OpenDocument
Titel: Re:GetAttachment
Beitrag von: ata am 15.04.03 - 10:55:25
... das schau ich mir mal an...

ata
Titel: Re:GetAttachment
Beitrag von: pippo am 15.04.03 - 11:10:12
Hallo Leute,

jetzt hab ich es selbst gemacht

löse den Anhang und starte ihn dann mit getobject

Grüße, Pippo