Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lotus Notes - using an array for the 'To' addresses
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00475398
Message ID:
00475405
Vues:
30
>I know this has been visited before, but I am stumped. I had been given the following code to use for creating an email in Notes (v4.6) with an array of names for the 'To' box:
>
>
DB=SESSION.GetDatabase(m.mailserver,m.mailfile)
>DOC=DB.CreateDocument()
>DOC.Form='Memo'
>DOC.Subject='Testing 123'
>DOC.Body="This is a test of VFP to Notes"
>DOC.From=session.UserName
>dimension recipients(2)
>recipients(1) = 'Phil Thomas'
>recipients(2)='John Smith'
>DOC.Send(.f.,recipients)
>doc.Save(.t.,.t.) &&Saves the document in the database
>
>I've finally gotten around to trying this - but the email is only created for the first name placed in the array. I am trying to 'build' a list of names based on form selections. Help!
>
>Thanks.

Try passing it using the by reference notation @.
dimension recipients(2)
recipients(1) = 'Phil Thomas'
recipients(2)='John Smith'
DOC.Send(.f.,@recipients)
If that doesn't work, you may have to use COMARRAY() to pass the array to the Nodesdocument COM object reference. See help for information if you need it.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform