Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default excel programming

I have a macro that sends an automatic email from Excel to notify that a file
needs to be reviewed.

Application.Dialogs(xlDialogSendMail).Show _
arg2:="MIX REQUEST: " & [JobName] & ".xls", arg3:=True

This places the filename of the file that needs to be reviewed into the
subject. Because it is going straight from excel, it also attaches the file.
Which argument in DialogSendMail should be marked false so that the
attachment doesn't go and just the email does?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel programming

Hi Pam

You need other code to do this
Do you use Outlook ???



"Pam M" schreef in bericht
...
I have a macro that sends an automatic email from Excel to notify that a
file
needs to be reviewed.

Application.Dialogs(xlDialogSendMail).Show _
arg2:="MIX REQUEST: " & [JobName] & ".xls", arg3:=True

This places the filename of the file that needs to be reviewed into the
subject. Because it is going straight from excel, it also attaches the
file.
Which argument in DialogSendMail should be marked false so that the
attachment doesn't go and just the email does?

__________ Information from ESET Smart Security, version of virus
signature database 4285 (20090728) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus signature database 4285 (20090728) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default excel programming

My old friend Ron. Thanks for responding! Yes, we use Outlook.

"Ron de Bruin" wrote:

Hi Pam

You need other code to do this
Do you use Outlook ???



"Pam M" schreef in bericht
...
I have a macro that sends an automatic email from Excel to notify that a
file
needs to be reviewed.

Application.Dialogs(xlDialogSendMail).Show _
arg2:="MIX REQUEST: " & [JobName] & ".xls", arg3:=True

This places the filename of the file that needs to be reviewed into the
subject. Because it is going straight from excel, it also attaches the
file.
Which argument in DialogSendMail should be marked false so that the
attachment doesn't go and just the email does?

__________ Information from ESET Smart Security, version of virus
signature database 4285 (20090728) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus signature database 4285 (20090728) __________

The message was checked by ESET Smart Security.

http://www.eset.com




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel programming

Hi Pam

Try this


Sub Mail_small_Text_Outlook()
'Working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"

On Error Resume Next
With OutMail
.To = "
.CC = ""
.BCC = ""
.Subject = ThisWorkbook.FullName 'or without path use
ThisWorkbook.Name
.Body = strbody
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.display 'or use .Display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub


"Pam M" schreef in bericht
...
My old friend Ron. Thanks for responding! Yes, we use Outlook.

"Ron de Bruin" wrote:

Hi Pam

You need other code to do this
Do you use Outlook ???



"Pam M" schreef in bericht
...
I have a macro that sends an automatic email from Excel to notify that a
file
needs to be reviewed.

Application.Dialogs(xlDialogSendMail).Show _
arg2:="MIX REQUEST: " & [JobName] & ".xls", arg3:=True

This places the filename of the file that needs to be reviewed into the
subject. Because it is going straight from excel, it also attaches the
file.
Which argument in DialogSendMail should be marked false so that the
attachment doesn't go and just the email does?

__________ Information from ESET Smart Security, version of virus
signature database 4285 (20090728) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus
signature database 4285 (20090728) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus
signature database 4285 (20090728) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus signature database 4285 (20090728) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default excel programming

Ron--tried this today...perfect. Once again, thank you for your brilliance.
Have a great day, Pam

"Pam M" wrote:

I have a macro that sends an automatic email from Excel to notify that a file
needs to be reviewed.

Application.Dialogs(xlDialogSendMail).Show _
arg2:="MIX REQUEST: " & [JobName] & ".xls", arg3:=True

This places the filename of the file that needs to be reviewed into the
subject. Because it is going straight from excel, it also attaches the file.
Which argument in DialogSendMail should be marked false so that the
attachment doesn't go and just the email does?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Programming danjordan2000 Excel Discussion (Misc queries) 1 November 17th 08 01:20 PM
Excel/VBA programming Carlos A Excel Discussion (Misc queries) 2 July 24th 05 10:21 PM
Excel Programming help Geoff D'Arcy Excel Worksheet Functions 2 November 1st 04 06:31 PM
Very New in Excel Programming Wael Mabsout Excel Programming 0 January 18th 04 07:26 PM
Excel Programming Dan Gorman Excel Programming 3 December 3rd 03 11:34 PM


All times are GMT +1. The time now is 11:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"