O
Olga23
Zdravstvujte, gragdane U menya k vam vopros. U menya est tekstovoe pole v odnoj forme i mne nado unasledovat znachenie etogo polya v druguju formu, gde pole toge tipa text. V debuggere, kogda ya smotrju skript moey programmki, ya vigu,chto nasledovanie proishodit, no ne vse znachenija iz polya tipa text nasledujutsya...Naprimer pole tekst, gde mogno pisat bolshe odnogo znachenija i znachenija razdeleni zapyatimi...Tam est: Voda, zemlya, u menya proishodit nasledovanie tolko Vodi, zemlya uge ne nasleduetsya...Vot kusaochki moego koda:
Function SetVarFields( cdoc As NotesDocument, mdoc As NotesDocument ) As Variant
Dim temp(10) As String
Dim newrtitem As NotesRichtextItem
Dim textrtitem As NotesRichtextItem
mail.SendTo = cdoc.EMail_T
Call mail.RemoveItem( "Body" )
Set newrtitem = mail.Createrichtextitem( "Body" )
Set textrtitem = mdoc.Getfirstitem( "Body" )
Call newrtitem.Appendtext( cdoc.LetterSalutation_T(0) )
Call newrtitem.Addnewline(2)
Call newrtitem.Appendrtitem( textrtitem )
Stop
temp(0)=cdoc.Name1_T(0)
temp(1)=cdoc.City_T(0)
temp(2)=Trim(cdoc.Salutation_T(0) + " " + cdoc.Title_T (0)+ " " + cdoc.FirstName_T(0) + " " + cdoc.SurName_T(0))
temp(3)=cdoc.ReplyTo(0)
temp(4)=cdoc.CpyDocid_T(0) ' Firma DocID
temp(5)=cdoc.Docid_T(0)' Person DocID
temp(6)=cdoc.POBox_T(0)
temp(7)=cdoc.Zip_T(0)
temp(8)=cdoc.CpyCode_T(0)
temp(9)=cdoc.VerbandsG(0)
temp(10)=cdoc.AliasName_T(0)----->eto pole
SetVarFields=temp
End Function
Eta funkzija ispolzuetsya tut:
Function SendMailToList ( mdoc As NotesDocument, IsAgent As Integer ) As String
........
tdoc.Name1_T= firmaenInfo(0)
tdoc.City_T= firmaenInfo(1)
tdoc.ContactPerson_T=firmaenInfo(2)
tdoc.ReplyTo=firmaenInfo(3)
tdoc.CpyDocID_T=firmaenInfo(4)
tdoc.PerDocID_T=firmaenInfo(5)
tdoc.POBox_T=firmaenInfo(6)
tdoc.Zip_T=firmaenInfo(7)
tdoc.CpyCode_T=firmaenInfo(8)
tdoc.VerbandsG=firmaenInfo(9)
tdoc.AliasName_T=firmaenInfo(10)
......
V obschem vagen kod tolko pervoj funkzii...V debuggere v temp(10) kopiruetsya toko pervoe znachenie polya originala...Kak nibud mogno zdelat tak,chtobi i ostalnie znachenija, perechislennie v etom pole cherez zapyatuju nasledovalis?Mogno li tut ispolzovat forall?Zaranee ochen blagodarna...
Function SetVarFields( cdoc As NotesDocument, mdoc As NotesDocument ) As Variant
Dim temp(10) As String
Dim newrtitem As NotesRichtextItem
Dim textrtitem As NotesRichtextItem
mail.SendTo = cdoc.EMail_T
Call mail.RemoveItem( "Body" )
Set newrtitem = mail.Createrichtextitem( "Body" )
Set textrtitem = mdoc.Getfirstitem( "Body" )
Call newrtitem.Appendtext( cdoc.LetterSalutation_T(0) )
Call newrtitem.Addnewline(2)
Call newrtitem.Appendrtitem( textrtitem )
Stop
temp(0)=cdoc.Name1_T(0)
temp(1)=cdoc.City_T(0)
temp(2)=Trim(cdoc.Salutation_T(0) + " " + cdoc.Title_T (0)+ " " + cdoc.FirstName_T(0) + " " + cdoc.SurName_T(0))
temp(3)=cdoc.ReplyTo(0)
temp(4)=cdoc.CpyDocid_T(0) ' Firma DocID
temp(5)=cdoc.Docid_T(0)' Person DocID
temp(6)=cdoc.POBox_T(0)
temp(7)=cdoc.Zip_T(0)
temp(8)=cdoc.CpyCode_T(0)
temp(9)=cdoc.VerbandsG(0)
temp(10)=cdoc.AliasName_T(0)----->eto pole
SetVarFields=temp
End Function
Eta funkzija ispolzuetsya tut:
Function SendMailToList ( mdoc As NotesDocument, IsAgent As Integer ) As String
........
tdoc.Name1_T= firmaenInfo(0)
tdoc.City_T= firmaenInfo(1)
tdoc.ContactPerson_T=firmaenInfo(2)
tdoc.ReplyTo=firmaenInfo(3)
tdoc.CpyDocID_T=firmaenInfo(4)
tdoc.PerDocID_T=firmaenInfo(5)
tdoc.POBox_T=firmaenInfo(6)
tdoc.Zip_T=firmaenInfo(7)
tdoc.CpyCode_T=firmaenInfo(8)
tdoc.VerbandsG=firmaenInfo(9)
tdoc.AliasName_T=firmaenInfo(10)
......
V obschem vagen kod tolko pervoj funkzii...V debuggere v temp(10) kopiruetsya toko pervoe znachenie polya originala...Kak nibud mogno zdelat tak,chtobi i ostalnie znachenija, perechislennie v etom pole cherez zapyatuju nasledovalis?Mogno li tut ispolzovat forall?Zaranee ochen blagodarna...