免费试用:最火的人工智能查询工具
     最强AI人工智能聊天工具
     对话机器人解答疑难问题
星外智问直连原始API接口(GPT-4o)
➡️未登录受限条数,请登陆使用完整服务>>>➡️
请输入您要问的问题:


查下百度  查下必应

以下是单个问题的回复:

问:用VBA写一段循环读取文件夹中所有文本文件,并且替换文件中的”作业”为”作文”的程序
GPT答: 7i24.cn
Sub 读取文件夹中所有文本文件并替换作业()

Dim FolderName As String
FolderName = InputBox("请输入文件夹的全路径:")

Dim FileName As String
FileName = Dir(FolderName & "\*.*", vbNormal)

Do While FileName <> ""

    If Right$(FileName, 3) = "txt" Then
        Dim FPath As String
        FPath = FolderName & "\" & FileName
        Dim txtContent As String
        Open FPath For Input As #1
        txtContent = Input(LOF(1), #1)
        Close #1
        txtContent = Replace(txtContent, "作业", "作文")
        Open FPath For Output As #1
        Print #1, txtContent
        Close #1
    End If

    FileName = Dir

Loop

MsgBox ("内容已替换!")

End Sub
一星  二星  三星  四星  五星 

互联网非法外之地,请不要输入不良内容
 查下百度 查下必应 02-24 23:09:35



chatGPT中国版--星外智问--8v6.CN
当前运行网址:haoadm.com
客服微信:xwgdd_com APP下载 怎么问 识别真假GPT4 使用GPT赚钱 退出登陆