Visual Basic6.0文件读写 *** 作 急a

Visual Basic6.0文件读写 *** 作 急a,第1张

把你猛腔陵的

Open FileString For Output As #1

换成

Open FileString 圆羡For 枝戚Append As #1

试试

#include <iostream>吵盯

#include <fstream>

using namespace std

int main()

{

    ofstream s

    s.open("1.txt")

    s<<"Turbo C 液枝"<<"BASIC "<<"FORTRAN "<<"COBOL "<<"PL 1"

    s.close()

    return 升埋和0

}

修改了一下:

Dim 燃胡晌wd As New Word.Application

Dim doc As Word.Document

Set doc = wd.Documents.Add(App.Path & "\试验test.doc") '做枣当模板用add,否则用皮锋open

doc.Bookmarks("test").Range.Text = "Obama"

doc.SaveAs App.Path & "\试验test.doc"

doc.Close

wd.Quit

测试通过,未见错误。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/12216448.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-21
下一篇 2023-05-21

发表评论

登录后才能评论

评论列表(0条)

保存