有点罗嗦,请高手把参数空值赋值为1个空格这段简化下,多谢!
内部函数代码如下:
Dim Receiver As String = Args(0) '必须是邮箱地址,多个地址之间用";"分开
Dim Cc As String = Args(1) '必须是邮箱地址,多个地址之间用";"分开
Dim Bcc As String = Args(2) '必须是邮箱地址,多个地址之间用";"分开
Dim Subject As String = Args(3)
Dim Body As String = Args(4)
Dim Proc As New Process
'函数参数如果为空值,则赋值为空格,避免调用mailto出错
If Receiver Is Nothing Then
Receiver = " "
End If
If Cc Is Nothing Then
Cc = " "
End If
If Bcc Is Nothing Then
Bcc = " "
End If
If Subject Is Nothing Then
Subject = " "
End If
If Body Is Nothing Then
Body = " "
End If
Proc.File = "mailto:" & Receiver & "?cc=" & Cc & "&bcc=" & Bcc & "&subject=" & Subject & "&body=" & Body
Proc.Start()