Das Notes Forum

Domino 9 und frühere Versionen => ND8: Entwicklung => Thema gestartet von: sculer am 29.10.10 - 16:16:25

Titel: Attachment per Copy and Paste von einen ins andere Dokument
Beitrag von: sculer am 29.10.10 - 16:16:25
Hallo,

irgendwie funktioniert mein code leider nicht richtig. Hat da vielleicht jemand einen Tipp!?

Code
'DECL
	Dim ws As New NotesUiworkspace
	Dim s As New NotesSession
	
	Dim db As NotesDatabase
	Dim view As NotesView
	Dim uidoc As NotesUiDocument
	Dim doc As NotesDocument
	Dim foundDocument As Boolean
	Dim LCse As New LCSession
'INIT
	Set uidoc = ws.CurrentDocument
	Set db = s.CurrentDatabase
	Set view = db.GetView(VIEWNAME_OF_LASTDOCUMENT)
'LOAD
	Call view.Refresh
'CHECKS
	
'START
	uidoc.EditMode = True
	Call uidoc.GotoField(ITEMNAME_OF_ATTACHMENT)
	Call uidoc.SelectAll
	Call uidoc.Copy
	uidoc.Document.Saveoptions = "0"
	Call uidoc.Close
	
	Set doc = view.GetFirstDocument
	Do Until doc Is Nothing Or foundDocument
		If doc.form(0) = FORMNAME Then foundDocument = True
		Set doc = view.GetNextDocument(doc)
	Loop
	
	Call ws.EditDocument(True,doc)
	LCse.Sleep (500)
	Call uidoc.GotoField(ITEMNAME_OF_ATTACHMENT)
	Call uidoc.Paste
	

Das Script soll eigentlich nur alle Attachments aus einen Dokument kopieren dieses Dokument schließen und ein anderes öffnen und dort einfügen.

Bis auf das Einfügen funktioniert auch alles soweit!!
Wer hat sowas schon einaml gemacht, und kann mir sagen, was ich falsch mache?!

thx

Titel: Re: Attachment per Copy and Paste von einen ins andere Dokument
Beitrag von: Peter Klett am 29.10.10 - 16:24:11
Call ws.EditDocument(True,doc)

Set uidoc = ws.EditDocument(True,doc)
Titel: Re: Attachment per Copy and Paste von einen ins andere Dokument
Beitrag von: sculer am 29.10.10 - 16:58:17
ohhh...

thx

PS: dummer Fehler !!!