相关疑难解决方法(0)

在outlook中粘贴特定的excel范围

我正在处理我想要自动化的Excel报告,但是,单元格的范围未粘贴在Outlook中.

这是我的代码:

Sub Mail_Selection_Range_Outlook_Body()

Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object

Set rng = Nothing
On Error Resume Next
' Only send the visible cells in the selection.
Set rng = Selection.SpecialCells(xlCellTypeVisible)
Set rng = Sheets("Sheet1").RangeToHtml("D4:D12").SpecialCells(xlCellTypeVisible, xlTextValues)
On Error GoTo 0

If rng Is Nothing Then
    MsgBox "The selection is not a range or the sheet is protected. " & _
           vbNewLine & "Please correct and try again.", vbOKOnly
    Exit Sub
End If

With Application …
Run Code Online (Sandbox Code Playgroud)

excel outlook vba excel-vba

6
推荐指数
2
解决办法
13万
查看次数

使用 Outlook 发送邮件时隐藏屏幕更新

我必须将报告发送到 400 多个电子邮件地址(B 列)。每个报告的文件路径位于 C、D 和 E 列。

\n\n

通过这篇文章:如何在 Outlook 中添加默认签名,.display使用该方法时会添加签名。

\n\n

我要显示的签名是用户号 1 的签名。我已选择相应的签名作为新消息的默认签名。

\n\n

该签名包含图片,但这似乎不会造成任何问题。

\n\n

我不希望宏每次发送邮件时都显示邮件,因为我想避免屏幕上不断闪烁。

\n\n

我试图从这里寻找类似“隐藏”方法的东西,但没有找到任何有用的东西(.display会在后台运行,并且会对用户隐藏)。另一个想法是添加application.screenupdating = false并相应地true,但这没有任何影响。

\n\n

如何在后台显示电子邮件而不是每次都向用户显示?

\n\n
Sub sendFiles_weeklyReports()\n\n    Dim OutApp As Object\n    Dim OutMail As Object\n\n    Dim sh As Worksheet\n    Dim EmailCell As Range\n    Dim FileCell As Range\n    Dim rng As Range\n\n    Dim lastRow As Long\n    Dim timestampColumn As Long\n    Dim fileLogColumn As Long\n    Dim i As Long\n\n    Dim …
Run Code Online (Sandbox Code Playgroud)

email excel outlook vba

5
推荐指数
1
解决办法
3768
查看次数

使用Excel VBA在Outlook中添加包含图像的默认签名

我想在图像上添加签名。此处的图像指的是公司徽标和社交网络图标。

这段代码是用Excel VBA编写的,目标是将范围复制粘贴为Outlook电子邮件中的图片。

Dim Rng                     As Range
Dim outlookApp              As Object
Dim outMail                 As Object

Dim wordDoc                 As Word.Document
Dim LastRow                 As Long
Dim CcAddress               As String
Dim ToAddress               As String
Dim i                       As Long
Dim EndRow                  As String

Dim Signature               As String

'// Added Microsoft word reference

Sub Excel_Image_Paste_Testing()

    On Error GoTo Err_Desc

    '\\ Define Endrow
    EndRow = Range("A65000").End(xlUp).Row

    '\\ Range for copy paste as image
    Set Rng = Range("A22:G" & EndRow)
    Rng.Copy

    '\\ Open a new mail item …
Run Code Online (Sandbox Code Playgroud)

excel outlook vba

4
推荐指数
1
解决办法
3135
查看次数

标签 统计

excel ×3

outlook ×3

vba ×3

email ×1

excel-vba ×1