Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populating variables
Message
De
01/07/2005 04:32:52
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01028044
Message ID:
01028046
Vues:
13
This message has been marked as the solution to the initial question of the thread.
Be aware that Outlook has a limit to how long the lcrecipients string can be, I have set a limit to 2000 in my program.
lcrecipient=''
Scan For !Empty(EMAIL) and &yourcondition
  If Len(lcrecipient)=0
    lcrecipient=ALLTRIM(EMAIL)
  Else
    lcrecipient=lcrecipient + ';' + AllTrim(EMAIL)
  Endif
  IF Len(lcrecipient)>=2000
    Messagebox('Too many recipients!')
  Endif
Endscan
>I am using the outlook mail program which I downloaded in the downloads section which works great.
>Although there is a variable called lcrecipients which I would like to populate from my table based on a parameter. Therefore my table looks like this:
>
>
>Dept                  Name                   Email
>T59                   John                   John@ddddd.com
>T59                   Mark                   Mark@ddddd.com
>T57                   Julie                  Julie@ddddd.com
>T59                   Susan                  Susan@ddddd.com
>
>
>What I would like to do is scan for a particular department then join the email adresses together to populate lcrecipients: For example if dept = T59 then
>
>lcrecipients="John@ddddd.com,Mark@ddddd.com,Susan@ddddd.com"
>
>Im getting confused on putting the commas in and how to stop putting a comma in if it is the last email address found. Can anybody help me please?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform