Domino 9 und frühere Versionen > ND6: Entwicklung
Frage zu Import von Dateien in ein Dokument
Glombi:
Ich würde es mit Script machen:
Zuerst die Auswahl der Word-Datei mit Filter:
stringArray = notesUIWorkspace.OpenFileDialog( false , [title$] , "Microsoft Word|*.doc", [initialDirectory$] , [initialFile$] )
fileName = stringArray(0)
und dann ein
Call notesUIDocument.Import( "Microsoft Word", fileName )
Andreas
Glombi:
Hier der Code (das Rich Text Feld heisst bei mir "Body"):
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim stringArray As Variant
Dim fileName As String
Set uidoc = ws.CurrentDocument
stringArray = ws.OpenFileDialog( False , "Word-Datei wählen" , "Microsoft Word|*.doc" )
fileName = stringArray(0)
Call uidoc.GotoField( "Body" )
Call uidoc.Import( "Microsoft Word", fileName )
Silent_Bob:
vielleicht schau ich mir das mit dem Script mal an. Aber was mich etwas irritiert ist:
Call uidoc.Import( "Microsoft Word", fileName )
FileName... muss ich da den Dokumentennamen angeben? Wenn ja, ist das ja auch blöd, da ich dann für jeden Importvorgang das Script neu anpassen müsste. Und da könnte ich ja dann eher über Menü gehen
Glombi:
???
Die Datei wählst Du doch vorher aus:
...
stringArray = ws.OpenFileDialog( False , "Word-Datei wählen" , "Microsoft Word|*.doc" )
fileName = stringArray(0)
...
Du musst nix am Code ändern.
Andreas
Silent_Bob:
Ah so, das hatte ich überlesen...
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln