![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Location: Kitchener, Canada
Posts: 32
|
I'm using the following code in the middle of a procedure to email a file to another user:
Dim OL As Object Dim MailSendItem As Object Dim olmailitem As String Set OL = CreateObject("Outlook.Application") Set MailSendItem = OL.CreateItem(0) With MailSendItem .Subject = "Email" .Body = strBody .To = strEmail .Attachments.Add("C:File.xls") .Send End With I state in the user guide that the user must have MS Exchange as it seems to work on my work and home PC (both with MS Exchange). The problem is some users with MS Exchange don't have the email send automatically. Any suggestions??? |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Location: Cape Town,South Africa
Posts: 234
|
Hi there buddy
See if this code will work for you : Sub EMAIL() Mailee = InputBox("Please Enter Name to Send sheet to.........") subj = InputBox("Please enter eMail Subject..............") Application.Dialogs(xlDialogSendMail).Show arg1:="", arg2:="As Requested" Recipients = Mailee.Subject = subj.Close End Sub Glad to be of assistance to people in need of help |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Cape Town,South Africa
Posts: 234
|
Let me know If it does work for you
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Feb 2002
Location: Kitchener, Canada
Posts: 32
|
Doesn't work. Get a compile error (Invalid qualifier) on the "Mailee.Subject" statement.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|