Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Pitfour
at 2024-07-16 16:10:23
Point:500 Replies:3 POST_ID:828994USER_ID:11894
Topic:
Microsoft Applications;;
This code works fine in Excel 2003 :
Sub Send_Email_Current_Workbook()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "xxx.xxx@xxx.xxx.uk"
.CC = ""
.BCC = ""
.Subject = "XXX Update"
.Body = "See attached"
.Attachments.Add ActiveWorkbook.FullName
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
but this attaches the whole workbook. I really need to attach the relevant daily sheet. As it stands, the macro button is only on one master worksheet.
Sub Send_Email_Current_Workbook()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "xxx.xxx@xxx.xxx.uk"
.CC = ""
.BCC = ""
.Subject = "XXX Update"
.Body = "See attached"
.Attachments.Add ActiveWorkbook.FullName
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
but this attaches the whole workbook. I really need to attach the relevant daily sheet. As it stands, the macro button is only on one master worksheet.
Expert: duncanb7 replied at 2024-07-17 01:05:32
Could you write more in detail and clearly so that other experts will understand your question exactly and completely ?
What is
Questions and comments in the thread is easier to be understood will be faster to be solved.
Duncan
What is
evidently the grammar checker had run for the hills. This followed by a link to microsoft.com. The jury is still out...
? Questions and comments in the thread is easier to be understood will be faster to be solved.
Duncan
Author: Pitfour replied at 2024-07-17 00:16:37
There is similar your issue llink at from which, - evidently the grammar checker had run for the hills. This followed by a link to microsoft.com. The jury is still out...
Expert: duncanb7 replied at 2024-07-16 23:20:07
There is similar your isssue link at
from whcih, it will email a worksheet using Outlook by the code .Attachments.Add
http://social.msdn.microsoft.com/Forums/office/en-US/89a25955-9f00-4ab2-94b9-50775b1f1a25/excel-vba-email-worksheet-as-attachment-with-outlook-using-rons-code?forum=exceldev
Please search outlook Attchments.Add for detail
http://msdn.microsoft.com/en-us/library/ff458119(v=office.11).aspx
Is it what or where you want to start to solve your issue ?
Hope understand your question, If not, please pt it out
Duncan
from whcih, it will email a worksheet using Outlook by the code .Attachments.Add
http://social.msdn.microsoft.com/Forums/office/en-US/89a25955-9f00-4ab2-94b9-50775b1f1a25/excel-vba-email-worksheet-as-attachment-with-outlook-using-rons-code?forum=exceldev
Please search outlook Attchments.Add for detail
http://msdn.microsoft.com/en-us/library/ff458119(v=office.11).aspx
Is it what or where you want to start to solve your issue ?
Hope understand your question, If not, please pt it out
Duncan