Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get Outlook to actually send messages in the OutB
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01158911
Message ID:
01415548
Vues:
57
>Here is how to force it out, depending on your setting it might not go right away
>
oOutlook = GETOBJECT(,"Outlook.Application")
>   oNameSpace= oOutlook.GetNamespace("MAPI")
>   oFolder = oNameSpace.GetDefaultfolder(4)     && Go to Outbox, folder 4
>   oSend = oFolder.Items(1).Send                && Send waiting items
>
>
>>I am sending e-mail messages in MS OutLook through Automation and OutLook is placing the messages in the OutBox, I want to know how to force Outlook to actually send the messages as if I clicked the send/receive button.

Mike,

Does this code send all items that may be in the Outbox folder? What is Items(1) here?

Thanks again.

Update. It didn't work and even introduced a problem with security warning again.

Update 2. I tried all methods from this ink

http://www.outlookcode.com/d/code/sendnow.htm

None worked for me - I'm using Office 2007 here.

Update 3. This code

Sync = loNameSpace.SyncObjects.ITEM(1)
Sync.START()

seems to work, though with a slight delay.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform