Autor Thema: Link von Notes auf ein Word-Dokument  (Gelesen 1402 mal)

Offline chriss76

  • Junior Mitglied
  • **
  • Beiträge: 99
  • Ich liebe dieses Forum!
Link von Notes auf ein Word-Dokument
« am: 01.07.05 - 09:15:35 »
Moin,

wir haben eine Art Dokumentenmanagement-System in Form einer Notes-Datenbank.
Wir wollen nun nicht mehr einzelne Dokumente (Word, Excel, Powerpoint, Bilder usw.) in der Datenbank ablegen, sondern nur noch einen Link in dem Notes-Dokument einbauen, der direkt auf die entsprechende Datei im Netzwerk verlinkt.
Wenn man also auf einen Link in der Notes DB klickt, soll Word geöffnet werden und die entsprechende Datei angezeigt werden.

Wie kann ich das machen?
Geht das überhaupt??
Es soll aber nicht der Internet Explorer geöffnet werden, in dem dann Word angezeigt wird, sondern direkt in Word.

Danke und viele Grüsse

Chris

Offline Axel

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 8.658
  • Geschlecht: Männlich
  • It's not a bug, it's Notes
Re: Link von Notes auf ein Word-Dokument
« Antwort #1 am: 01.07.05 - 09:33:14 »
Hi,

ich hab so was ähnliches mal aus dem Web gefischt. Allerdings geht's hier um Anhänge.
Aber es sollte kein Problem sein das entsprechend anzupassen. Wichtig ist hier die ShellExecute - Funktion.

Code
Extract and start all attachments
Start one or all attachments with the appropriate file extension executable, using shell32.dll.
Code
Declare Function SleepEx Lib "kernel32" Alias "SleepEx" (Byval
dwMilliseconds As Long, Byval bAlertable As Long) As Long
Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (Byval hwnd As Long, Byval lpOperation As String,
Byval lpFile As String, Byval lpParameters As String, Byval
lpDirectory As String, Byval nShowCmd As Long) As Long
Function ExtractAndView(Doc As NotesDocument)
On Error Goto ErrorExtractAndStartAttchments
If Doc.HASEMBEDDED = True Then
Forall eItem In Doc.ITEMS
If (eItem.Type = Clng(RICHTEXT))  Then
If Not (Isempty(eItem.EMBEDDEDOBJECTS)) Then
Forall  fItem In eItem.EMBEDDEDOBJECTS
If fItem.Type = EMBED_ATTACHMENT Then
Call fItem.EXTRACTFILE( "C:\Temp" & fItem.Name)
ret = ShellExecute(handle&, "open", "C:\Temp" & fItem.Name, "", "", 1&)
xx = SleepEx (4000,0)
Doevents
                                                 'Exit Forall ' Only First attachment
End If
End Forall
  End If
End If
End Forall
End If
ExitExtractAndStartAttchments:
Exit Function
ErrorExtractAndStartAttchments:
Msgbox ("in ExtractAndView: " + Error$(Err))
Resume ExitExtractAndStartAttchments
End Function


Axel
Ohne Computer wären wir noch lange nicht hinterm Mond!

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz