Domino 9 und frühere Versionen > ND8: Entwicklung

Hauptdokument mit Antwortdokumenten kopieren und autom. ändern

<< < (2/5) > >>

koehlerbv:
Statt Call doc.CopyToDtabase

Set docNewMain = doc.CopyToDatabase

Dann kannst Du später
Set docNewResponse = resdoc.CopyToDatabase
Call docNewResponse.MakeResponse (docNewMain)
verwenden.

Bernhard

DAU-in:
wie es in der Hilfe steht:

Set newNotesDocument = notesDocument.CopyToDatabase( notesDatabase )


und lass das mit getnth-document!!!!!!!!

Driri:
Noch eine kleine Anmerkung :

resdoc ist nicht sauber deklariert. So ist resdoc erstmal vom Typ Variant.

pimpfling:
Hallo, den Hinweis in der Hilfe hatte ich zwischenzeitlich auch gefunden :)

Habs jetzt so gemacht und bekomme beim "MakeResponse" ein Type Mismatch:
Das kopieren des Hauprdoks und des ersten Antwortdoks klappt noch...


Dim session As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim dc As NotesDocumentCollection
Dim resdoc, newresdoc, newdoc, doc As NotesDocument
   
Set db = session.CurrentDatabase   
Set uidoc = workspace.CurrentDocument
   
Set doc = uidoc.Document
   
Set newdoc = doc.CopyToDatabase( db )
   
Set dc = doc.Responses
   
If dc.Count > 0 Then
   For i = 1 To dc.Count      
      Set resdoc = dc.GetNthDocument(i)
      Set newresdoc = resdoc.CopyToDatabase( db )
      Call newresdoc.MakeResponse( newdoc )
   Next  'For i = 1 To collection.Count
End If  'If collection.Count = 0 Then

pimpfling:
Hier noch die Fehlermeldung:

Type mismatch in method RunStkCoerceRef: Unknown found, Unknown expected

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln