Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Michael Hagl" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: "Outlook.Application" sendUsingAccount Date: Tue, 12 Dec 2017 07:41:18 +0100 Lines: 56 Message-ID: References: X-Trace: individual.net 4lp7XWYRPDn+NvFOafEhfA/M7YSQRFtYZJzv6gqaNnnzZKvPsW Cancel-Lock: sha1:OHyfaIBuokNUm2MWUumckS8UVdo= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Response Xref: csiph.com comp.lang.clipper.visual-objects:11235 Hi Allessandro, I´m using the following lines (but is xHarbour Code) ... IF !Empty(cFromAccount) TRY Account := oOutlook:Session:Accounts[cFromAccount] IF !(Account==NIL) oMsg:SendUsingAccount := Account ENDIF CATCH END ENDIF ... Michael Hagl "Alessandro Vacchiano" schrieb im Newsbeitrag news:p0m3jt$pt3$1@gioia.aioe.org... > Hi to all, > > i need to send email by Outlook and send it by selecting an Account. > This code reads all accounts from my outlook: > > oOutlook: OLEAutoObject = {"Outlook.Application"} > oAccounts: = oOutlook: Session: Accounts > > for i: = 1 upto oAccounts: Count > oAccount: = oAccounts: item (s) > > ? oAccount: Displayname > next > > > Now when i send an eMail i need to send with one of this but i got an OLE > Error. > > oAccounts: = oOutlook: Session: Accounts > oAccount: = oAccounts: item (3) > > > .. i prepare the email then: > > oMail: sendUsingAccount: = oAccount > > oMail: Send () > > sendUsingAccount not work i get error, some suggestion? > > Thanks a lot > > Alessandro