我将使用excel向我的客户发送电子邮件,要求他们提供某些文件。我有一切工作,除了一个小细节,我不想使用它,直到我得到了1个细节。

我的电子邮件几乎完美填充,除了最后,“问候”和我的签名之间有大约3行空格。我不确定为什么会这样。它显示如下:

感谢您对此事的关注。

此致

签名

有谁知道如何修复它。我的代码如下:

Sub KYC_FATCA()

Dim OutApp As Object

Dim OutMail As Object

Dim cell As Range

Dim signature As String

Dim AccOpen As String

Dim ConDoc As String

Dim SIP As String

Dim AFS As String

Dim W8 As String

Dim LEI As String

Application.ScreenUpdating = False

Set OutApp = CreateObject("Outlook.Application")

On Error GoTo cleanup

For Each cell In Columns("G").Cells.SpecialCells(xlCellTypeConstants)

'KYC Account Opening Form

If (Cells(cell.Row, "I").Value) = "No" Then

AccOpen = "KYC Account Opening Form ." & "
" & "
"

Else

AccOpen = ""

End If

'Constating Document

If (Cells(cell.Row, "J").Value) = "No" Then

ConDoc = "Constating Document - ." & "
" & "
"

Else

ConDoc = ""

End If

'Statement of Policy and Guidelines (SIP&G)

If (Cells(cell.Row, "L").Value) = "No" Then

SIP = "Statement of Policy and Guidelines (SIP&G) - " & "
" & "
"

Else

SIP = ""

End If

'Audited Financial Statements (AFS)

If (Cells(cell.Row, "M").Value) = "No" Then

AFS = "Audited Financial Statements (AFS) - ." & "
" & "
"

Else

AFS = ""

End If

'W-8BEN-E Form

If (Cells(cell.Row, "N").Value) = "No" Then

W8 = "W-8BEN-E Form - " & "
" & "
"

Else

W8 = ""

End If

'Legal Entity Identifier (LEI)

If (Cells(cell.Row, "O").Value) = "Needed" Then

LEI = "Legal Entity Identifier (LEI) - " & "
" & "
"

Else

LEI = ""

End If

If cell.Value Like "?*@?*.?*" And _

(Cells(cell.Row, "H").Value) = "yes" Then

Set OutMail = OutApp.CreateItem(0)

With OutMail

.Display

End With

signature = OutMail.HTMLbody

On Error Resume Next

With OutMail

.To = cell.Text 'Whatever is in cell G

.cc = Cells(cell.Row, "C").Value

'Testing if statements - The below one works perfect

'If LCase(Cells(cell.Row, "Z").Value) = "" Then

' .cc = Cells(cell.Row, "P").Value

'End If

.Subject = Cells(cell.Row, "A").Value & " - " & "Documentation Request" _

.HTMLbody = "

" & "Dear " & Cells(cell.Row, "D").Value & ",
" & "
" & _

"On behalf of " & Cells(cell.Row, "B").Value & ", please by " & "" & Cells(cell.Row, "Q").Text & "" & "." & "
" & "
" & _

AccOpen & _

ConDoc & _

SIP & _

AFS & _

W8 & _

LEI & _

"If you have any questions and/or concerns, please contract your Relationship Manager, " & Cells(cell.Row, "B").Value & "." & "
" & "
" & _

"Thank you for your attention in this matter." & "
" & "
" & _

"Regards," & "

" & _

signature _

'You can add files also like this

If (Cells(cell.Row, "I").Value) = "No" Then

.Attachments.Add ("C:doc")

End If

.Display 'This will open the message itself. If you'd like to send right away, use .Send

End With

On Error GoTo 0

Set OutMail = Nothing

End If

Next cell

cleanup:

Set OutApp = Nothing

Application.ScreenUpdating = True

End Sub

html body 间距,VBA& HTMLBody - 正文和签名之间的间距相关推荐

  1. 注塑机摆放间距多少合适_仓储高位货架之间的间距留多大才合适呢?

    仓库高位货架不同于一般的仓储货架.比轻型.重型货架存储量都大,它的布局与其他的货架也是又多区别的,那么高位货架之间的摆放间距要留多大才是最合适的呢? 高位货架通道宽度的设计,高位货架作业通道的宽度,目 ...

  2. 【已解决】LaTeX 调整段落之间的间距 (包含:只调整某一个section或者subsection中的段落间距)

    文章目录 前言 正文 小结 参考文献 前言 如题,直接给出解决方案.核心代码:\newcommand{\setParDis}{\setlength {\parskip} {0.3cm} },详见正文. ...

  3. R语言ggplot2可视化自定义图例标签间距实战:自定义图例标签间距、自定义图例与图像之间的间距

    R语言ggplot2可视化自定义图例标签间距实战:自定义图例标签间距.自定义图例与图像之间的间距 目录

  4. html选择和按钮间距,html - 想要在按钮之间添加间距

    我有一个简单的任务,就像在下面的从http://bootboxjs.com/examples.html获得的示例代码中一样,在对话框中的按钮之间添加空格.试想一下,此示例中有多个按钮.像保存,删除,取 ...

  5. 关于去除2个inline-block之间的间距

    今天要做 这种效果的图.我是用span做的 图文与图文按钮.因为行内元素没有width与height,(虽然可以用padding撑大),本人更喜欢用width与height.于是用了display:i ...

  6. Android PullToRefreshListView设置各个item之间的间距

    要设置第三方的上拉下载listView的item之间的间距,可以在xml布局文件中的listView节点中设置xml的属性即可: android:divider="#00000000&quo ...

  7. css a 标签上下间距_CSS实用技能:去除inline-block元素间间距的7种方法

    现象描述 真正意义上的inline-block水平呈现的元素间,换行显示或空格分隔的情况下会有间距,很简单的个例子: 两个相邻的radio之间总是多那么一点点的间距,不是margin也不是paddin ...

  8. python设置横坐标间隔_如何在matplotlib中更改刻度之间的间距?

    刻度标签之间的间距完全由轴上刻度之间的间距决定.因此,在给定的ticklabel之间获得更多空间的唯一方法是使轴更大. 为了确定标签不重叠所需的空间,可以找出最大的标签并将其长度乘以滴答标签的数量.然 ...

  9. html两行中间间距怎么去,css行之间的间距怎么调?

    css行之间的间距可以使用line-height属性来进行调整.line-height(行高)属性的值越大,那么行间距就越高. line-height属性用于设置行使用的空间量,即行间的距离(行高): ...

最新文章

  1. 利用OpenCV的Grabcut()函数实现图像的前景与背景的分割-并对Grabcut()作详细介绍
  2. 最佳实践丨构建云上私有池(虚拟IDC)的5种方案详解
  3. sql like 多个条件_都9012年啦,不懂得这些SQL语句优化,你是要吃大亏的
  4. 系统升级不停服务器,服务器操作系统一直升级吗
  5. 转:.NET使用一般处理程序生成验证码!
  6. 基于JSP的题库试卷管理系统免费下载
  7. MathType工具栏在word里无法点击
  8. PDF文档如何解密?3个软件值得收藏
  9. 35 个非主流数据库
  10. 中英文标点符号切换的组合键_切换中英文标点快捷键
  11. ftp上传工具下载,八款中文绿色版ftp上传工具下载(ftp客户端)
  12. cpu天梯图2022年11月 cpu排行榜天梯图2022
  13. 从码农到工程师:只要做到这6点
  14. 云计算与大数据的应用及其相关性
  15. bash: setenv: command not found
  16. SAP PP初阶新建的工单保存后自动RELEASE
  17. 原生js实现点名册效果
  18. xp系统如何查看计算机用户,xp查看电脑配置、查看电脑型号详细教程和命令
  19. 2022-2027年中国小麦市场竞争态势及行业投资前景预测报告
  20. TFN OTDR光时域反射仪F1/F1K 手持式高精度光纤光缆断点检测仪

热门文章

  1. python可视化多个机器学习模型在独立测试集(test data set)上面的AUC值、可视化模型效能
  2. python代码检测链表中的环并删除环
  3. python-requests官网_requests使用心得
  4. docker nginx安装模块_docker安装nginx与php7.1
  5. Windows下创建PXE网络安装Linux[Redhat AS5.5]IBM X3650
  6. 测序技术有4个指标:读长、成本、准确度、通量
  7. pandas读取csv文件,变换文件格式,并转换成numpy数组,取出数据
  8. Nvidia TX2 安装中文输入法
  9. Caffe 中的卷积--权宜之计
  10. IDEA报错总结:修改Java编译版本--maven项目