社区
Delphi
帖子详情
有关WordApplication、WordDocument的页面设置问题?
Michaelyfj
2001-07-23 04:21:04
在Delphi5.0中,利用WordApplication和WordDocument来打印风格自由的报表。
但在页面设置中,我想把它分成两列来打印,请教在Delphi中如何控制,如下的
打印格式:
aaaaaaaaaa bbbbbbbbb
aaaaaaaaaa ccccccccc
dddddddddd eeeeeeeee
ffffffffff ggggggggg
即第1列打印到页底时,再打印第2列
...全文
132
3
打赏
收藏
有关WordApplication、WordDocument的页面设置问题?
在Delphi5.0中,利用WordApplication和WordDocument来打印风格自由的报表。 但在页面设置中,我想把它分成两列来打印,请教在Delphi中如何控制,如下的 打印格式: aaaaaaaaaa bbbbbbbbb aaaaaaaaaa ccccccccc dddddddddd eeeeeeeee ffffffffff ggggggggg 即第1列打印到页底时,再打印第2列
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
newyj
2001-07-29
打赏
举报
回复
word编程比较简单;只要录制宏;再对应过来即可
{'
' Macro3 Macro
' 宏在 2001-7-24 由 yj 录制
'
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="11", PageType:=wdPrintAllPages _
, ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile _
:=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
}
FileName:=''; Range:='4'{wdPrintRangeOfPages}; Item:='0';//wdPrintDocumentContent;
Copies:='1'; Pages:='2'; PageType:='0';//wdPrintAllPages;
ManualDuplexPrint:=False; Collate:=True; Background:=True;
PrintToFile :=False; PrintZoomColumn:=0; PrintZoomRow:=0;
PrintZoomPaperWidth:=0;
PrintZoomPaperHeight:=0 ;
append:=false;
from:=2;
to_:=2;
app.PrintOut(Background,Append , Range, filename, from, to_, Item, Copies, Pages, PageType, PrintToFile, Collate, FileName, EmptyParam, ManualDuplexPrint)
Michaelyfj
2001-07-24
打赏
举报
回复
给分!
后面还有问题要问你!
问题:在delphi中,如何设置WordDocument的页码?
新问题,有高分相送!
newyj
2001-07-23
打赏
举报
回复
先录宏
' 宏在 2001-7-23 由 yj 录制
'
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = CentimetersToPoints(2.54)
.BottomMargin = CentimetersToPoints(2.54)
.LeftMargin = CentimetersToPoints(3.17)
.RightMargin = CentimetersToPoints(3.17)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(1.5)
.FooterDistance = CentimetersToPoints(1.75)
.PageWidth = CentimetersToPoints(21)
.PageHeight = CentimetersToPoints(29.7)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.GutterPos = wdGutterPosLeft
With .TextColumns
.SetCount NumColumns:=2
.EvenlySpaced = True
End With
.CharsLine = 20
.LayoutMode = wdLayoutModeDefault
End With
delphi中;
WordDocument1.PageSetup.TextColumns.SetCount(2):即可
在Delphi中很精确地控制生成的
WORD
文档的格式
var
Word
Application
1: T
Word
Application
; 通过以下的方式就可以在DELPHI中很精确地控制生成的
WORD
文档的格式。 //-----------------打开
WORD
-------------------------------
Word
application
1.visible := ...
Servers 控件组
Word
application
表格 使用
RE: 如何把一个grid中显示的数据直接输出到
word
文件(存储为
word
或txt文件)?100分 ID=1823976, 发贴富翁: yanghaijun, 发贴时间:2003-5-3 11:30:00下面是我写的一个比较完整的输出到
WORD
的过程,你可能需要稍微改...
Delphi中编辑
word
//启动
Word
try
word
application
1.connect; except messagedlg('
word
may not be installed', mterror, [mbok], 0); abort; end; //打开文档 procedure TForm1.Open
Word
(Sfile: string); var ...
浅谈
Word
.
Application
,关于js操作
word
文档的使用
说真的,刚开始我也不知道可以用js操作
word
文档,所以当我拿到这个任务的时候,内心是抗拒的,因为听都没听说过,现在却要我做,先不说能不能找到相关教程,就算有,一边学一边做也难免会遇到各种
问题
啊。...
操作
Word
Application
.
Document
s.Open方法参数说明
返回
Document
对象。 语法2:打开指定的对象。当应用到子文件或RecentFile对象,语法2返回一个
Document
对象。 语法1 expression.Open(FileName,ConfirmConversions,ReadOnly,AddToRecentFiles,Pass
word
Doc...
Delphi
5,388
社区成员
262,729
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章