【发布时间】:2020-04-05 23:03:53
【问题描述】:
我有一个启用宏的 word 模板,其中包含一个用户表单组合框,我需要它插入的一些文本在文档上显示为粗体。我尝试只添加 html 元素,例如粗体 html,但它们不起作用。有没有办法在插入文本时设置部分文本的样式?
'Populate standard_response
With standard_response
.AddItem "<b><u>You were not provided written notice of charge.</u></b> You signed for and received a copy of the offense report detailing the charge against you on 00/00/00. You also verbally acknowledged during your disciplinary hearing on 00/00/00 that you received a copy of the offense report"
.AddItem "You were not provided at least 24 hours to prepare before hearing. You received a copy of the offense report detailing the charge against you on 00/00/00. Your disciplinary hearing was conducted on 00/00/00, therefore, you had at least twenty-four hours to prepare for the hearing. "
.AddItem "You were not permitted the opportunity to present relevant witness/es or to submit relevant written witness statements. During the active phase of the investigation you did not wish to call any witnesses as verified by your signature on the 'Disciplinary Coordinator's Report' on 7/19/19. You were also provided with the opportunity to present relevant written witness statements at your disciplinary hearing but did not do so."
.AddItem "There was no written statement of evidence utilized for a determination of guilt. Section III of the 'Disciplinary Hearing Report' cites a written statement of evidence relied on for the finding of guilt that identifies the offending behavior and is compliant with Section VII.D.2. of OP-060125, 'Offender Disciplinary Procedures.' "
End With
【问题讨论】:
-
用户窗体和 Word 文档都没有在其原生格式中使用 HTML 样式。您的代码示例似乎试图将组合框显示的一部分设置为粗体,而您的文本表明您希望最终文档中的文本为粗体。后者是可能的,但不是前者。
-
感谢您的信息
标签: vba combobox ms-word styles