Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dialogs(xlDialogSendMail).Show - how to delete attachment?
I'm using a line like this to allow the user to easilty send me an
email: Application.Dialogs(xlDialogSendMail).Show ", "My subject" But it automatically attaches an Excel workbook file. With some older versions of Excel (I don't recall which versions), I was able to delete the attachment with sendkeys: SendKeys "{TAB}{TAB}{TAB}{DELETE}" Application.Dialogs(xlDialogSendMail).Show ", "My subject" But that doesn't work anymore, at least not since Excel 2003. Is there a way to get rid of that attachment, without the user needing to manually delete it? Thanks, Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dialogs(xlDialogSendMail).Show - how to delete attachment?
Public Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Public Declare Function GetDesktopWindow Lib "user32" () As Long Sub preEmail() Dim sEmail As String sEmail = "mailto:" & " sEmail = sEmail & "?subject=The subject" sEmail = sEmail & "&Body=" & "some body text" sEmail = sEmail & "%20" nRes = ShellExecute(GetDesktopWindow(), vbNullString, _ sEmail, vbNullString, _ vbNullString, vbNormalFocus) End Sub Regards, Peter T "Greg Lovern" wrote in message ... I'm using a line like this to allow the user to easilty send me an email: Application.Dialogs(xlDialogSendMail).Show ", "My subject" But it automatically attaches an Excel workbook file. With some older versions of Excel (I don't recall which versions), I was able to delete the attachment with sendkeys: SendKeys "{TAB}{TAB}{TAB}{DELETE}" Application.Dialogs(xlDialogSendMail).Show ", "My subject" But that doesn't work anymore, at least not since Excel 2003. Is there a way to get rid of that attachment, without the user needing to manually delete it? Thanks, Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dialogs(xlDialogSendMail).Show - how to delete attachment?
Wow, thanks! That's great.
Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dialogs(xlDialog...).Show arguments usage | Excel Programming | |||
Application.Dialogs(xlDialogPrint).Show - prints too soon | Excel Discussion (Misc queries) | |||
returning values application.dialogs(...).show | Excel Programming | |||
Application.Dialogs(xlDialogSendMail).Show | Excel Programming | |||
Problems with application.Dialogs(xlDialogFormulaFind).Show | Excel Programming |