我用delphi向word写入三段话,第一段是居中字体为一号粗体。第二段是正常五号,居左第三段是居右字体为三号。请问是什么属性可以控制呀。已经定改文件了。
但就是排不了版。
帮帮我吧各位大哥谢了。
但就是排不了版。
帮帮我吧各位大哥谢了。
解决方案 »
- TService 中使用到网络路径的问题
- delphi2007安装问题
- 为何修改DATAGRID中数据时,第一次并没有读出需要修改的行信息?
- DELPHI中用来得到某个字符或字符串的ASCII码的函数是什么?
- 一个超简单的问题(白给你分)
- Delphi6提供的TClientSocket在一秒钟最多能接收TServerSocket发过来的多少个包呢?
- 请问我做一个像图片里的图表用Tchart的话要怎么做呀?
- 如何优化delphi?
- 问一个很菜的问题!!指针到底干什么用的!我怎么觉得他没有用呢?
- 用AdoQuery插Access数据库的问题。
- 问两个ACCESS的问题如何把表从数据库中分离出来,如何创建数据库?
- JScripts中的函数是否可以像Delphi中的一样定义类似var的参数
Selection.MoveLeft Unit:=wdCharacter, Count:=11, Extend:=wdExtend
Selection.Font.Name = "宋体"
Selection.Font.Size = 16
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.TypeText Text:="ASDADA"
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Font.Size = 10.5
Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeText Text:="ASDADA"
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
更复杂的操作请用word中的“宏录制”功能。
TempColWidth := 0;
TempSerialNum := 0;
TempAlign := 0;
TempMovePos := 0;
if FAlign.Strings[Temp] = '+' then //左对齐
TempAlign := 3
else if FAlign.Strings[Temp] = '-' then //右对齐
TempAlign := 2
else if FAlign.Strings[Temp] = '|' then //中间对齐
TempAlign := 1;
TempColWidth := StrToFloat(FWidths.Strings[Temp]);
//取出标题要插入的列
TempSerialNum := StrToInt(FSerialNum.Strings[Temp]);
if FTiltles.Strings[Temp] = '该列标题为空' then
MsTable.Cell(1,TempSerialNum).Range.Text := ''
else
MsTable.Cell(1,TempSerialNum).Range.Text := FTiltles.Strings[Temp];
if Temp = 0 then
begin
//光标移动到第二行;
MsAppl.Selection.Move( 10, 1);
MsAppl.Selection.ParagraphFormat.Alignment := TempAlign;
MsAppl.Selection.Columns.PreferredWidth := 28.3*TempColWidth;
end
else begin
//取出要移动的列位置;
TempMovePos := StrToInt(FSerialNum.Strings[Temp-1]);
//磅与厘米之间的转换,设置列的宽度
MsAppl.Selection.MoveRight(12, TempSerialNum-TempMovePos, 1);
MsAppl.Selection.ParagraphFormat.Alignment := TempAlign;
MsAppl.Selection.Columns.PreferredWidth := 28.3*TempColWidth;
end;这是一段关于对齐方式、字体大小的操作,不知是否对你有作用