如何将Excel工作表发送到Outlook邮箱? [英] How to send an Excel sheet to Outlook mailbox?

查看:566
本文介绍了如何将Excel工作表发送到Outlook邮箱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Excel文档来记录要传递给夜班的白天所做的工作,因此他们可以保持白天活动的最新状态,反之亦然.

I have an Excel document to log work done during the day to be passed to the nightshift so they are kept up-to-date with the days activites and vice versa.

计划是填写文档,然后单击发送"按钮,该按钮会将新创建的Excel工作表发送到共享的Outlook文件夹.

The plan is to fill out the document and click a 'Send' button that will send the newly created Excel sheet to a shared Outlook folder.

我的尝试是从网上复制的&尝试过,但无济于事.

My attempts have been scrapes off the web copied & tried, but to no avail.

推荐答案

也许有帮助:)

Sub outMail()

Dim outApp As Object
Dim oMail As Object
Dim signature As String
Dim obszar As String

Set outApp = CreateObject("Outlook.Application")
Set oMail = outApp.CreateItem(0)

With oMail
    .Display
End With

signature = oMail.Body

With oMail
    .To = "email@email.com"
    .CC = "email2@email.com"
    .BCC = ""
    .Subject = "Log work done during the day"
    .BodyFormat = 2
    .Body = "Hello" & Chr(13) & Chr(10) & "The newly created Excel sheet with log work done during the day " & Chr(13) & Chr(10) & signature

    'here You put directory to your file, for now its directory to file where macro is
    .Attachments.Add ActiveWorkbook.FullName

    'now its set to display only, if You want to send automatically put .send as below
    .Display
    '.Send

End With

End Sub

这篇关于如何将Excel工作表发送到Outlook邮箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆