把你猛腔陵的
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.ApplicationDim 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
测试通过,未见错误。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)