Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking For Mail w/Outlook
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00598604
Message ID:
00598701
Vues:
18
>Using Outlook, anyone know how to check for new email? I know how to check
>to see what's in the Inbox, but I want to check for new mail. This would be
>equivilent to clicking the Send/Receive button.

Hi Kevin,

having grubbed the Outlook help files for a Send/Receive method several times without success, I tried to figure out how to click the Send/Receive menu item through VBA. This is working for me (VFP 7, Win2k, Outlook XP):
LOCAL loOA,loAE,loMnuTools,loMnuItem


loOA = CREATEOBJECT("Outlook.Application")
loAE = loOA.ActiveExplorer
IF NOT ISNULL(loAE) AND (TYPE("loAE") == "O")
  loMnuTools = loAE.CommandBars.Item("Tools")
  loMnuItem  = loMnuTools.Controls("Senden/Empfangen").Controls("Alle senden und empfangen")
  loMnuItem.Execute()
ENDIF
loMnuItem  = .NULL.
loMnuTools = .NULL.
loAE       = .NULL.
loOA       = .NULL.
RELEASE lo*
You'll have to swap the german menu item captions with the english captions. Probably the menu structures are different in elder versions of Outlook. Would be interesting to hear about that...

HTH Robert
I've acquired quite a taste for a well-made mistake... [Fiona Apple]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform