我想选择一个文本框,然后往里面复制一幅图,我用宏抓下来的代码如下:Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2003-4-28 by HZR
'
ActiveDocument.Shapes("Text Box 5").Select //这句话怎么翻译成DELPHI里的命令呢? Selection.Paste
Selection.ShapeRange.Select
ActiveDocument.Shapes("Text Box 2").Select
Selection.TypeText Text:="ff"
End Sub我把第一条SELECT语句改成: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.请问怎么用DELPHI在WORD里选择一个文本框?非常感谢!
'
' Macro2 Macro
' Macro recorded 2003-4-28 by HZR
'
ActiveDocument.Shapes("Text Box 5").Select //这句话怎么翻译成DELPHI里的命令呢? Selection.Paste
Selection.ShapeRange.Select
ActiveDocument.Shapes("Text Box 2").Select
Selection.TypeText Text:="ff"
End Sub我把第一条SELECT语句改成: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.请问怎么用DELPHI在WORD里选择一个文本框?非常感谢!
http://www.soulan.com/kingron/delphi/ole_office_array.htm