C
caplin
Unregistered / Unconfirmed
GUEST, unregistred user!
var wordApp,wordDoc:variant;
begin
wordApp:=createOleObject('Word.Application');
wordApp.visible:=true;
wordDoc:=wordApp.Documents.add;
wordApp.selection.style:=wordDoc.style.item('标题 1');//这句老出错,提示:"Style不是一种引用属性".
end;
如果我自接用server 组件是可以通过set_style()函数解决.
var olevar1,olevar2,olevar3levariant;
begin
WordApplication1.connect;
WordApplication1.visible:=true;
olevar1:='normal.dot';
olevar2:=false;
WordApplication1.documents.add(olevar1,olevar2);
olevar3:='标题 1';
WordApplication1.set_style(olevar3);
end;
begin
wordApp:=createOleObject('Word.Application');
wordApp.visible:=true;
wordDoc:=wordApp.Documents.add;
wordApp.selection.style:=wordDoc.style.item('标题 1');//这句老出错,提示:"Style不是一种引用属性".
end;
如果我自接用server 组件是可以通过set_style()函数解决.
var olevar1,olevar2,olevar3levariant;
begin
WordApplication1.connect;
WordApplication1.visible:=true;
olevar1:='normal.dot';
olevar2:=false;
WordApplication1.documents.add(olevar1,olevar2);
olevar3:='标题 1';
WordApplication1.set_style(olevar3);
end;