0

我正在尝试引用图像位置。这有效:

Dim r1img3 As New LinkedResource("\\raws01\nacha$\achSystemItems\emailImages\r1img3.jpg") 

但我试图让路径部分作为预设变量被拉入,并将其与文件名连接起来,但我无法让它工作。

我基本上是在尝试做这样的事情:

Dim emailImages As String = CStr(Dts.Variables("emailImages").Value)
Dim r1img3 As New LinkedResource(emailImages + "r1img3.jpg")

请问有什么帮助吗?非常感激。

4

1 回答 1

0

Can't tell without knowing what CStr(Dts.Variables("emailImages").Value) produces. Give this a try, may be you are just overlooking a \.

Dim r1img3 As New LinkedResource(Path.Combine(emailImages,"r1img3.jpg"))
于 2012-09-20T22:48:44.863 回答