Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP-Outlook
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00222848
Message ID:
00223824
Vues:
37
>Bruce,
> That fix worked! Here's the working code for anyone lurking:
>Doug
>
>LOCAL loForm
>loForm = createobject( 'form')
>WITH loForm
> .addobject("Session1", "olecontrol", "MSMAPI.mapiSession")
> .addobject("Message1", "olecontrol", "MSMAPI.mapiMessages")
> .Session1.signon()
> WITH .MESSAGE1
> .sessionid = loForm.Session1.sessionid
> .compose()
> .msgsubject = "Put the Subject here"
> .msgnotetext = "Test goes here, you can send anything you want, a memo filed ect..."
> .AddressResolveUI = .T.
> .RecipAddress = "DOUGLAS.OSBORNE@SASIPOS.COM"
> .AttachmentIndex = 0
> .AttachmentName="setup.ini"
> .AttachmentPathName="c:\dbm\setup.ini"
> .AttachmentIndex = 1
> .AttachmentName="setup.exe"
> .AttachmentPathName="c:\dbm\setup.exe"
> *
> *-By the way, if you add this line here:
> *
> *.AttachmentIndex = 2
> *
> *- You get the error we started with:
> *-OLE IDispatch exception code 0 from MAPIMessages:
> *-Upspecified Failure has occurred..
> *
> .send()
> ENDWITH
> .Session1.signoff()
>ENDWITH

A more efficient way (and loop-able) is .AttachmentIndex=.AttachmentCount, AttachmentCount will automatically update itself.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform