通过api无法设置超链接内部分文字的样式

阅读次数 9
			await instance.ready();
			const app = instance.Application;

			// 获取选中区域
			const range = await app.ActiveDocument.Range(0, 1)
			console.log(range)

			// 设置区域范围
			const test = await range.SetRange(0, 1)
			app.ActiveDocument.Selection.Font.Underline = 6
			app.ActiveDocument.Selection.Font.UnderlineColor = '#BE0001'

image.png

0 Answers