Autor Thema: Attachment per Copy and Paste von einen ins andere Dokument  (Gelesen 1372 mal)

Offline sculer

  • Aktives Mitglied
  • ***
  • Beiträge: 117
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


Offline Peter Klett

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 2.713
  • Geschlecht: Männlich
Re: Attachment per Copy and Paste von einen ins andere Dokument
« Antwort #1 am: 29.10.10 - 16:24:11 »
Call ws.EditDocument(True,doc)

Set uidoc = ws.EditDocument(True,doc)

Offline sculer

  • Aktives Mitglied
  • ***
  • Beiträge: 117
Re: Attachment per Copy and Paste von einen ins andere Dokument
« Antwort #2 am: 29.10.10 - 16:58:17 »
ohhh...

thx

PS: dummer Fehler !!!

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz