ฉันต้องใช้คอยตามมาโครที่จะดึงออกรายการอยู่ในวงเล็บต้องหมายเหตุอยู่ในคำ:
'
' CommentBubble Macro
'
'
Dim myRange As Range
Set myRange = ActiveDocument.Content
searchtext = "\(*\)"
With myRange.Find
.MatchWildcards = True
Do While .Execute(findText:=searchtext, Forward:=True) = True
If Len(myRange.Text) > 4 Then
ActiveDocument.Comments.Add myRange, myRange.Text
myRange.Text = ""
End If
Loop
End With
End Sub
เหตุผลที่ฉันมีความยาวของข้อความเป็น>4 เป็นเพราะพวกนี้คือเอกสารทางกฏหมายและฉันไม่อยากแยกเส้นนั้นอยากได้อะไรบางอย่างเหมือน"ในเงื่อนไขต่อไปนี้:(ฉัน)เงื่อนไข 1,(ฉัน)เงื่อนไขที่ 2 เป็นต้น"
อย่างไรก็ตามนี่คือ snippet ของข้อความสำหรับที่ด้านบนรหัสทำลาย:
This is sample text (with some additional text) that does stuff (with more stuff) and represents 39.4% of shares on the effective date (before giving effect, with some conditions such as ( some stuff (i) and some stuff (ii) with final stuff) and more final stuff) which is subject to (some conditions here) and conclude here.
ถ้าคุณวิ่งนี้คุณจะได้ติดตามผล:
This is sample text that does stuff and represents 39.4% of shares on the effective date and some stuff (ii) with final stuff) and more final stuff) which is subject to and conclude here.
อย่างที่คุณสามารถเห็นรอบการวงเล็บราะปัญหาบางอย่าง มีคำแนะนำอะไรไหม?
ขอบคุณ!