C
chy.com
Unregistered / Unconfirmed
GUEST, unregistred user!
MSWord:=CreateOLEObject('Word.APPlication');
MSWord.Documents.Open(Filename:='C:/新华网网站排名工具/test.doc',ReadOnly:=True);
MSWord.Visible:=0;
MSWord.ActiveDocument.Range(Start:=0,End:=0);
MSWord.ActiveDocument.Range.InsertAfter(Text:=DatetoStr(Date));
MSWord.ActiveDocument.Range.InsertParagraphAfter;
MSWord.ActiveDocument.Range.InsertAfter(Text:=Findit('adchinaanchinaaddfadddwsaf3reftrefsdfaaaaaaaewr','>><<','<dsfsdafds'));
MSWord.ActiveDocument.SaveAS('c:/111111111.doc');
MSWord.ActiveDocument.Close;
这种写法对吗?执行没有问题当时进程中Word没有杀掉,如何解决??
还有我想先写一个Word魔板,里面有表格,表格里用标示代替,想每次通过修改标示生成新的word文件,能给点例子吗?
MSWord.Documents.Open(Filename:='C:/新华网网站排名工具/test.doc',ReadOnly:=True);
MSWord.Visible:=0;
MSWord.ActiveDocument.Range(Start:=0,End:=0);
MSWord.ActiveDocument.Range.InsertAfter(Text:=DatetoStr(Date));
MSWord.ActiveDocument.Range.InsertParagraphAfter;
MSWord.ActiveDocument.Range.InsertAfter(Text:=Findit('adchinaanchinaaddfadddwsaf3reftrefsdfaaaaaaaewr','>><<','<dsfsdafds'));
MSWord.ActiveDocument.SaveAS('c:/111111111.doc');
MSWord.ActiveDocument.Close;
这种写法对吗?执行没有问题当时进程中Word没有杀掉,如何解决??
还有我想先写一个Word魔板,里面有表格,表格里用标示代替,想每次通过修改标示生成新的word文件,能给点例子吗?