我的word文件包含以下
的一些数据product/productId: 0784010927
review/userId: A19V0VJMKKRMC8
review/profileName: jj "Justin"
review/helpfulness: 1/1
review/score: 5.0
review/time: 1031961600
review/summary: one of my all tyime faves
review/text: i am from this genration which makes me different because i like movies from the 80s. well this is a must see.
product/productId: 0784010927
review/userId: A3OZU2EMJQ5FIC
review/profileName: danielle levin
review/helpfulness: 1/1
review/score: 5.0
review/time: 1022025600
review/summary: The Best in the world
review/text: This movie has touched me so much it's great. The movie is about a a young girl who is a little daddy girl and does everything she is told until she met her love Johnny (Patrick Swayze). Baby (Jennifer Grey) learns not only how to dance
但我想从每个段落中删除以review \ text开头的行部分。我的输出应该是那样的
product/productId: 0784010927
review/userId: A3OZU2EMJQ5FIC
review/profileName: danielle levin
review/helpfulness: 1/1
review/score: 5.0
review/time: 1022025600
review/summary: The Best in the world
任何人都可以在Microsoft Word或任何其他解决方案中使用宏来帮助我。
答案 0 :(得分:0)
尝试
Sub Demo()
With Selection.Find
While .Execute(FindText:="review/text", Forward:=True)
If .Found = True Then
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.TypeBackspace
End If
Wend
End With
End Sub
确保将光标放在文档的起始位置。