子弹发生html代码,查找并替换子弹列表到html样式

我想查找项目符号列表的实例,以替换为html标记的列表.请参阅下面的示例:

my_doc.docx

text,text,text

My bullet list:

• List point one

• List point two

Some more text here.

找到并替换导致

text,text,text

My bullet list:

  • List point one
  • List point two

Some more text here.

我试过找到并替换子弹字符;不起作用,因为它的格式.还尝试查找和替换样式为“List bullet”的行以及我能找到的任何其他列表样式;不起作用,(也许是因为我使用Word for Mac似乎有些错误)

编辑:

我有以下VBScript,在我的文档中找到具有子弹样式的行.我现在需要这个脚本来重写它找到的行最后的标签.

Sub FindBullet()

Dim oPara As Word.Paragraph

Dim count As Integer

count = 0

Selection.WholeStory

With Selection

For Each oPara In .Paragraphs

If oPara.Range.ListFormat.ListType = _

WdListType.wdListBullet Then

count = count + 1

# from here down it gets shaky!!!

With ActiveDocument.Range.Find

.Text = #How do i convert the oPara to a string here?!?

.Forward = True

.Wrap = wdFindContinue

.Format = False

.MatchCase = True

.MatchWholeWord = False

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

.ClearFormatting

With .replacement

.ClearFormatting

.Text = # how do i specify this is where i want the "

" & oPara & ""

End With

.Execute Replace:=wdReplaceAll

End If

Next

End With

'Gives you the count of bullets in a document

MsgBox count & " replacements"

End Sub

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值