ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sendkey (https://www.excelbanter.com/excel-programming/345080-sendkey.html)

Jordan

Sendkey
 
I have an Excel workbook with multiple sheets. I need to automate sending
each sheet by it's self as an attachment. I dont know much about programming
but I figured out how to copy the information I need, open a new workbook,
paste the information into that workbook and then by using "SendKeys "%(FDA)"
an email will popup with the file attached.

At that point the user would send the email out and then the rest of macro
needs to run. Which would be for it to close the new workbook without saving
it and go to the next sheet in the first or master workbook and do the same
thing.

Everything seemed to work except two things. (1)If I put any command or
code after the sendkey, the sendkey is ignored. (2)If I try using a hot key
ie alt-c, the sendkey is ignored.

This is just the way I thought to do it. If there is a better way, any
suggestions are welcome

Thank you in advance for your help.

Oorang

Sendkey
 
I know it is counter intuitive but just use Application.Dialogs(189).Show

It will load the current workbook into the default email client without you
having to use sendkeys.

"Jordan" wrote in message
...
I have an Excel workbook with multiple sheets. I need to automate sending
each sheet by it's self as an attachment. I dont know much about
programming
but I figured out how to copy the information I need, open a new workbook,
paste the information into that workbook and then by using "SendKeys
"%(FDA)"
an email will popup with the file attached.

At that point the user would send the email out and then the rest of macro
needs to run. Which would be for it to close the new workbook without
saving
it and go to the next sheet in the first or master workbook and do the
same
thing.

Everything seemed to work except two things. (1)If I put any command or
code after the sendkey, the sendkey is ignored. (2)If I try using a hot
key
ie alt-c, the sendkey is ignored.

This is just the way I thought to do it. If there is a better way, any
suggestions are welcome

Thank you in advance for your help.





All times are GMT +1. The time now is 04:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com