猫头鹰111

导航

VB批量替换文本字符

Private Sub Command1_Click()
Open App.Path & "\abc.txt" For Binary As #1
a = Input(LOF(1), 1)
Close #1
a = Replace(a, "标记一", Text1.Text)
a = Replace(a, "标记二", Text2.Text)
a = Replace(a, "标记三", Text3.Text)
Open App.Path & "\abc.txt" For Output As #2
Print #2, a
Close #2
End Sub

posted on 2019-02-20 13:17  猫头鹰111  阅读(1522)  评论(0编辑  收藏  举报