请问如何通过vba把数据和位置导入到word文本框.可否给个最简单的demo//word的文本框为什么在delphi里提示msoTextOrientationDownward变量没定义呢?是否有其他单元没有引用?
procedure TForm1.BitBtn1Click(Sender: TObject);
var
iNum:integer;
begin
for iNum := 1 to 15 do
begin
WordDoc.Shapes.AddTextbox(msoTextOrientationDownward,Left, Top, Width, Height,index).TextFrame.TextRange.Text := IntToStr(iNum);
Top := Top + Height;
end
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
var
iNum:integer;
begin
for iNum := 1 to 15 do
begin
WordDoc.Shapes.AddTextbox(msoTextOrientationDownward,Left, Top, Width, Height,index).TextFrame.TextRange.Text := IntToStr(iNum);
Top := Top + Height;
end
end;
解决方案 »
- 如何把stringgrid设置成如图所示。
- 在delphi中,我要向某函数同时传递一批不同类型的控件,如TEDIT、TButton、Tcheckbox控件,而且个数不定,怎么实现
- 请教~~请问如何用delphi监控一个其他程序的窗体?当这个程序的窗口出现时 执行一段代码,当这个窗口关闭时 执行一段代码 ? 谢谢!!!
- 用delphi好多年,第一次碰到奇怪的内存报错 望高手帮忙看下 谢谢
- 不用报表控件怎么实现数据批量打印?
- Camtasia Studio的实现技术
- delphi7.0
- 怎样在访问数据库后发现没有连接上数据库实现重新连接
- 菜鸟问题。。多多指教
- api函数
- delphi7通过ADODB连接MYSQL5.1 求助
- delphi中调用webservice时,出错,请大虾帮忙~~~
MsoTextOrientation 可以是下列 MsoTextOrientation 常量之一:
msoTextOrientationDownward
msoTextOrientationHorizontal
msoTextOrientationHorizontalRotatedFarEast
msoTextOrientationMixed
msoTextOrientationUpward
msoTextOrientationVertical
msoTextOrientationVerticalFarEast
就是个常量
可以试试
WordDoc.Shapes.AddTextbox(0,Left, Top, Width, Height,index).TextFrame.TextRange
通过vba自动生成的代码 word文本框的确是msoTextOrientationHorizontal
自己看
http://www.sudu.cn/info/html/edu/20071227/54259.html