Spasibo bolshoe za pomosch
Vot chto poluchilos(agent):
Sub Initialize
Dim collection As NotesDocumentCollection
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim doc1 As NotesDocument
Dim view As NotesView
' View "AllByName"-eto View, gde vse Dokumenti, dokument Firmi dlya kagdoj Firmi, pod dok-tom firmi-dokumenti sotrudnikov, i drugie dokumenti
Set view = db.GetView( "AllByName" )
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
' hole alle Dokumente mit der CpyDocID_T
searchFormula$ = {Form != "Company" & CpyDocID_T = "" + cstr(doc.universalid)}
Set collection = db.Search(searchFormula$, Nothing,0)
Set doc1 = collection.GetFirstDocument()
While Not(doc Is Nothing)
doc1.VerbandsG = doc.VerbandsG
Call doc1.Save( True, False )
Set doc1 = collection.GetNextDocument(doc1)
Wend
Messagebox collection.Count, , "Child documents found"
Set doc = view.GetNextDocument( doc )
Wend
End Sub
Poluchilos kak bi zikl v zikle...Snachala mi berem rodit dok-t, dlya nego nahodim vse dochernie, u nih odno i toge znachenie CpyDocID... I potom menyaem pole VerbandsG dochernego na VerbandsG roditelya...I tak dlya vseh dokumentov...No zagvozdka vot v chem...Kogda zapuskayu agent, vihodit soobschenie-viberite dokument iz spiska, eto ladno, vibirayu...I potom oshibka:
"Object variable not set"...V debuddere smotrju, idet vse a posle Dim-ov stagu ge ostanavlivaetsya i dalshe ni odna knopka debuggera ne aktivna krome zavershit i vijti iz debuggera....
Chto ge mne teper s etim hozyajstvom delat to?Kto nibud, pomgite pogalujsta