Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test macro on 2 PC's,XP email sent is seen in Outlook Sent ITems, when run from Win 7 it is not...

Status
Not open for further replies.

Pack10

Programmer
Feb 3, 2010
495
US
I have a wierd one. I have 2 pc's at the office, one is XP and the other is Windows 7. I recently got the Win 7 PC.
I have been running and testing my Nightly tasks on the new pc and have noticed some wierd behavior. When I run a macro from the XP machine (the macro contains an email at the end of the job) the email is visible in my Outlook Sent Items view. However, when I run the macro from the Windows 7 PC, the macro run but I don't see the email in the Sent Itms view. Any ideas?
 
This is code that the macro is running... sensitive info has been changed.

DoCmd.SendObject acSendQuery, "OFFICE ACTIVITY FINAL", acFormatXLS, "Implementation_Mgmt_@test.com", , , "Activity Report", , False
 
What is the default mail agent in your windows 7 box ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi thanks for responding. Not clear what you mean by default mail agent but we use Outlook 2007. So the XP PC is running Office 2007 as well as the Windows 7 PC.
 
I solved it by using Outlook objects. When I run it now using the full Outlook object via VBA code, it shows up
in the sent box of Outlook. So from now on, I suppose I will stay away from DoCmd.SendObject .....
 
One minor issue. Now that it runs via code, the file sent is not in spreadsheet format...it is not formatted
like it was when it ran under the Docmd.Transferspreadsheet command. It's not a big deal, but I would like it to look better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top