这条语句是实现选择WORD里面的一个文本框,VBA代码为:ActiveDocument.Shapes("Text Box 2").Select这句话在DELPHI里怎么写呢? 我改成:WordDoc.Shapes('Text Box 5').Select;结果报错:
Project raised exception class EOleException with message "Shapes' is not a method".
Process stopped. Use Step or Run to continue.
Project raised exception class EOleException with message "Shapes' is not a method".
Process stopped. Use Step or Run to continue.
解决方案 »
- 终于可以脱掉裤衩 顶着星星裸奔了<二> 剩余的200分
- 关于:查询数据库,长时间等待时的动态提示
- 一个简单的SQL语句,请大虾帮忙!
- FastReport如何将两个报表的内容顺序打出,不换页?
- 奇怪的trunc函数.
- 错误提示:Circular unit reference to 'LoginForm'
- PowerPointApplication打开的编辑窗口怎么关掉?
- TTable的Locate问题
- 请问各路高手,是否能在同一个QReport上排列几张报表的数据?
- CHAR型变量如何转换为BYTE型,BYTE型变量如何转换为CHAR型,还有如何将一个字符串如'123'转换成BYTE或CHAR型变量。
- 提示问题及日期计算问题
- 请问如和搜索指定目录下的文件
Template,NewTemplate,DocumentType,Visible: OleVariant;
Orientation, Left, Top, Width, Height, Anchor:OleVariant;
WordApp: TWordApplication;
begin
WordApp:=TWordApplication.Create(Application);
WordApp.Visible:=True;
Template:='';
NewTemplate:=False;
DocumentType:=wdNewBlankDocument;
Visible:=True;
WordApp.Documents.Add(Template,NewTemplate,DocumentType,Visible);
Orientation:=msoTextOrientationDownward;
Left:=10;
Top:=10;
Width:=20;
Height:=20;
Anchor:=WordApp.ActiveDocument.Content;
WordApp.ActiveDocument.Shapes.AddTextbox(Orientation, Left, Top, Width, Height, Anchor);
end;