2010-05-26 33 views
0

当我尝试在outlook电子邮件中创建两个文件作为链接时,只有其中一个文件显示为链接。我该如何解决这个问题,因此两者都会显示为链接。在VBA中添加多个链接

设置omail = CreateItem(olMailItem)

With omail 

    .Subject = "Key Report" 
    .BodyFormat = olFormatHTML 
    .HTMLBody = "<a href ='" & fileL & "'>Key Report</a>" 
    .HTMLBody = "<a href ='" & fileSat & "'>Key Report Saturday</a>" 
    .To = [email protected]  
    .Display 

    End With 

回答

1

你必须与你的代码有问题。你应该重置HTMLBody,当你连接它们。

试试这个:

Set omail = CreateItem(olMailItem) 

With omail 
    .Subject = "Key Report" 
    .BodyFormat = olFormatHTML 
    .HTMLBody = "<a href ='" & fileL & "'>Key Report</a>" & _ 
       "<a href ='" & fileSat & "'>Key Report Saturday</a>" 
    .To = [email protected]  
    .Display 
End With 

提示:人们会更倾向于回答你的问题,如果你通过接受你过去的问题的一些答案增加您的接受率。为免费提供帮助的人提供几个代表点并不需要花费任何代价。

+0

你是怎么做到的? – Edmond 2010-05-26 22:04:50

+0

谢谢你的帮助 – Edmond 2010-05-26 22:05:12

+0

你怎么做? – JohnFx 2010-05-26 22:10:50