Hi Sue,
I tried with : "Send All" and "All Accounts" ... but still giving me an
"Automatio error " on oCtl.Execute
here is my code:
Public Sub SendReceiveNow()
Dim oCtl As Office.CommandBarControl
Dim oPop As Office.CommandBarPopup
Dim oCB As Office.CommandBar
Dim ol As New Outlook.Application
'Use the Send/Receive on All Accounts action in the Tools
'menu to send the items from the Outbox, and receive new items
Set oCB = ol.ActiveExplorer.CommandBars("Menu Bar")
Set oPop = oCB.Controls("Tools")
Set oPop = oPop.Controls("Send/Receive")
Set oCtl = oPop.Controls("Send All") '("All Accounts")
oCtl.Execute
Set oCtl = Nothing
Set oPop = Nothing
Set oCB = Nothing
Set ol = Nothing
End Sub
"Sue Mosher [MVP-Outlook]" <
[email protected]> a écrit dans le message
de news: (e-mail address removed)...
Where is this code running? Application in this case needs to be an
Outlook.Application object.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
I just tried it another time and it gives me an error on:
Set oCB = Application.ActiveExplorer.CommandBars("Menu Bar")
ActiveExplorer member not found.
Nour
"Sue Mosher [MVP-Outlook]" <
[email protected]> a écrit dans le
message
de news: (e-mail address removed)...
Variation #2 should work on Outlook 2002.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
Hi,
Sorry for the delay .. I was busy on other tasks.
I tried the code presented in:
http://www.outlookcode.com/d/code/sendnow.htm and no method worked
for
me.
What versions of access/outlook is needed.
I use a standalone PC connected with fax line, ACCESS 2002,
Outlook
2002.
Also if possible, what reference should I.
Thanks,
Nour
"Sue Mosher [MVP-Outlook]" <
[email protected]> a écrit dans
le
message
de news: (e-mail address removed)...
See
http://www.outlookcode.com/d/code/sendnow.htm for various
methods,
depending on the Outlook version.
Hi,
I have an application that sends out faxes ...
The faxes are kept in the outbox waiting for the "send & receive"
button
click.
How can I force by code (VBA) the "send & recevive" action to
happen
just
after I send the fax. I am using MS Fax.
Thanks,
Nour