這可能是一個很小的東西,我想念,但我似乎無法找到問題。問題與HYPERLINK
Sub sendemail()
'Save the form with todays date
Application.Save Format(Now, "dd-mm-yy") & ".xls"
'Create the email
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<HTML><BODY>"
strbody = strbody & "<A href= http://ne-xxx.xxx.xxx.xxx.biz/ASP/SFP/BHGP/xxUK-OPS/Shared%20Documents/xxx/AllItems.aspx?RootFolder=%2fAxP%2fASP%2fBP%2fNUK%2dOPS%2fShared%20Documents%2f60%2e%20Shift%20Schedule&FolderCTID=&View=%7b1A03DBA9%2d7CEB%2d466F%2d8EA8%2dDDE03D95CDC0%7d>URL</A>"
strbody = strbody & "</BODY></HTML>"
On Error Resume Next
With OutMail
.To = "[[email protected]]"
.cc = ""
.BCC = ""
.Subject = "New Holiday Request on " & Format(Now(), "dd/mm/yyyy") & " by " & Range("C2") & ""
.Body = strbody
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Debug.Print strbody
End Sub
最終結果應該只是在電子郵件中的超鏈接...但它顯示:
http://ne-xxx.xxxx.xxx.xxxx.xxx/sSP/SXP/BJHJP/ xxx-OPS/Shared%20Documents/Forms/AllItems.aspx?RootFolder =%2fASP%2fSsP%2foP%2fNBXUK%2dOPS%2fShared%20Documents%2f60%2e%20Shift%20Schedule & FolderCD = & View =%7b1A03DBA9%2d7CEB%2d466F %2d8EA8%2dDDE03D95CDC0%7D> URL
嘗試包裹在apostrophies網址 – Moob
你需要加倍報價,href =「」http:/// ...「」 –
似乎沒有工作 – user3013325