【发布时间】:2021-12-06 14:18:22
【问题描述】:
我有以下不完整的代码:
Private Sub CommandButton1_Click()
'Updated by Extendoffice 2017/9/14
Dim xOutApp As Object
Dim xOutMail As Object
Dim xMailBody As String
On Error Resume Next
Set xOutApp = CreateObject("Outlook.Application")
Set xOutMail = xOutApp.CreateItem(0)
xMailBody = "** We need all of the following to get the control points to set up the Point Files." & vbNewLine & vbNewLine & _
"1. Civil CAD drawing with all project grids placed in true coordinates." & vbNewLine & _
"2. CSV or Text file with Northing, Easting and Elevation coordinates of all marked and confirmed site control locations." & vbNewLine & _
"3. Job Site: " & vbNewLine & _
"4. Requester Name: " & vbNewLine & _
"5. Brief detail of reason for training need(s): "
On Error Resume Next
With xOutMail
.To = "jsmith@test.com"
.CC = ""
.BCC = ""
.Subject = "INFORMATION NEEDED TO CREATE SITE AND BUILDING CONTROL"
.Body = xMailBody
.Display 'or use .Send
End With
On Error GoTo 0
Set xOutMail = Nothing
Set xOutApp = Nothing
End Sub
#2 上的文本更长,并且由于某种原因创建了一个额外的行,如下所示: ** 我们需要以下所有内容来获取控制点来设置点文件。
-
Civil CAD 绘图,所有项目网格都放置在真实坐标中。
-
CSV 或文本文件,其中包含所有标记和确认的测试的北距、东距和高程坐标,以查看这是否有效
-
工作地点:
-
请求者姓名:
-
需要培训的原因的简要说明:
谁能帮我纠正这个问题。 谢谢!
【问题讨论】: