outlook vba html语言,使用变量在Outlook VBA中创建超链接时显示文件路径(html和字符串连接)(Displaying file path when using variabl...

I'm creating a macro in Outlook to read file paths stored in an Excel file and create hyperlinks. I'm so close to getting it working but this last bit of code is driving me nuts. I have the string with the file path stored in a variable called FilePath. When I write the html to hyperlink the text displayed is the word FilePath instead of the string that variable is supposed to hold. I know I'm just messing up the quotations but I'm ripping out my hair trying to figure out where the right place to put them is. Here's my code:

k = 0

For i = 1 To UBound(arr)

FilePath = arr(k)

oMsg.HTMLBody = "FilePath" & "
" & oMsg.HTMLBody

k = k + 1

Next i

The hyperlink is correct and I can open the file when I click it but all the links say FilePath instead of the actual file path. Any pointers in the right direction would be greatly appreciated.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Sure, here's the code for displaying an ordered list with uppercase letters as the numbering: <ol type="A"> <li>Spring</li> <li>Summer</li> <li>Fall</li> <li>Winter</li> </ol> Hope that helps! ### 回答2: 要写标记语言代码来显示一个有序列表,使用大写字母作为序号,并在列表显示"Spring"、"Summer"、"Fall"和"Winter",可以使用HTML标记语言来实现。 下面是一个示例代码: ```html <ol type="A"> <li>Spring</li> <li>Summer</li> <li>Fall</li> <li>Winter</li> </ol> ``` 在上述代码,我们使用了`<ol>`标签来定义一个有序列表,并通过`type`属性设置序号的类型为大写字母。每个列表项使用`<li>`标签包裹,分别包含了"Spring"、"Summer"、"Fall"和"Winter"四个项目。 运行以上代码,将会在浏览器显示一个有序列表,每个项目前面都会用大写字母进行标记,如下所示: A. Spring B. Summer C. Fall D. Winter ### 回答3: 要写标记语言代码显示一个有序列表,并使用大写字母作为序号,在列表显示Spring、Summer、Fall和Winter,可以使用HTML标记语言来实现。HTML的有序列表使用<ol>和</ol>标签来标识,列表项使用<li>和</li>标签来表示。每个列表项可以添加自定义的id属性,并使用CSS样式指定大写字母作为序号。以下是一个示例代码: <!DOCTYPE html> <html> <head> <style> ol { list-style-type: upper-alpha; } </style> </head> <body> <ol> <li id="item1">Spring</li> <li id="item2">Summer</li> <li id="item3">Fall</li> <li id="item4">Winter</li> </ol> </body> </html> 在上述代码,<ol>标签定义了一个有序列表,使用CSS样式指定了大写字母作为序号。每个列表项使用<li>标签表示,并在li标签添加了id属性,可以根据需要自定义id的命名。通过修改CSS样式,可以改变序号的样式,例如要使用小写字母代替大写字母,可以将list-style-type的值改为lower-alpha。保存以上代码为.html文件,打开文件可以看到一个有序列表,序号为大写字母,显示了Spring、Summer、Fall和Winter这四个季节。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值