- 浏览: 174078 次
- 来自: ...
文章分类
最新评论
-
fsword:
同事拿着试了一下,说是把第五步放到第二步之前就可以了
在windows下安装ruby1.9.2,rails3.0.3和DevKit--转 -
dothwinds:
[flash=200,200][/flash][url][/u ...
打包ruby or rails成exe(英文)
下为程序中的一段,解决了为文档增加一个段落样式。这个段落样式的基础样式为“标题2”,标题字体、字号重设了,关键是设了自动编号的功能。
procedure TForm1.titlestyle(wordapp: variant);
begin
try
// wordapp.ActiveDocument.Styles.item('自定标题').Delete;
except
end;
wordapp.ActiveDocument.Styles.Add(Name := '自定标题', type := wdStyleTypeParagraph);
wordapp.ActiveDocument.Styles.item('自定标题').AutomaticallyUpdate := False;
wordapp.ActiveDocument.Styles.item('自定标题').AutomaticallyUpdate := False;
wordapp.ActiveDocument.Styles.item('自定标题').BaseStyle := '标题 2 ';
wordapp.ActiveDocument.Styles.item('自定标题').Font.NameFarEast := ' + 中文标题';
wordapp.ActiveDocument.Styles.item('自定标题').Font.NameAscii := ' + 西文标题';
// wordapp.ActiveDocument.Styles.item('自定标题').Font.NameOther := ' + 西文标题';
wordapp.ActiveDocument.Styles.item('自定标题').Font.Name := ' + 西文标题';
wordapp.ActiveDocument.Styles.item('自定标题').Font.Size := 10.5;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Bold := True;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Italic := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Underline := wdUnderlineNone;
wordapp.ActiveDocument.Styles.item('自定标题').Font.UnderlineColor := wdColorAutomatic;
wordapp.ActiveDocument.Styles.item('自定标题').Font.StrikeThrough := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.DoubleStrikeThrough := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Outline := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Emboss := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Shadow := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Hidden := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.SmallCaps := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.AllCaps := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Color := wdColorAutomatic;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Engrave := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Superscript := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Subscript := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Scaling := 100;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Kerning := 0;
wordapp.ActiveDocument.Styles.item('自定标题').Font.Animation := wdAnimationNone;
wordapp.ActiveDocument.Styles.item('自定标题').Font.DisableCharacterSpaceGrid := False;
wordapp.ActiveDocument.Styles.item('自定标题').Font.EmphasisMark := wdEmphasisMarkNone;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.LeftIndent := CentimetersToPoints(0.74);
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.RightIndent := CentimetersToPoints(0);
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.SpaceBefore := 6;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.SpaceBeforeAuto := False;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.SpaceAfter := 6;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.SpaceAfterAuto := False;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.LineSpacingRule := wdLineSpace1pt5;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.Alignment := wdAlignParagraphLeft;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.WidowControl := True;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.KeepWithNext := True;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.KeepTogether := True;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.PageBreakBefore := False;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.NoLineNumber := False;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.Hyphenation := True;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.FirstLineIndent := CentimetersToPoints(-0.74);
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.OutlineLevel := wdOutlineLevel1;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.CharacterUnitLeftIndent := 0;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.CharacterUnitRightIndent := 0;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.CharacterUnitFirstLineIndent := 0;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.LineUnitBefore := 0;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.LineUnitAfter := 0;
wordapp.ActiveDocument.Styles.item('自定标题').ParagraphFormat.BaseLineAlignment := wdBaselineAlignAuto;
wordapp.ActiveDocument.Styles.item('自定标题').NoSpaceBetweenParagraphsOfSameStyle := False;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).NumberFormat := '%1.';
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).TrailingCharacter := wdTrailingTab;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).NumberStyle := wdListNumberStyleArabic;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).NumberPosition := CentimetersToPoints(0);
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Alignment := wdListLevelAlignLeft;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).TextPosition := CentimetersToPoints(0.74);
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).TabPosition := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).ResetOnHigher := 0;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).StartAt := 1;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Bold := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Italic := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.StrikeThrough := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Subscript := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Superscript := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Shadow := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Outline := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Emboss := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Engrave := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.AllCaps := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Hidden := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Underline := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Color := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Size := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Animation := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.DoubleStrikeThrough := wdUndefined;
wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).Font.Name := '';
// wordapp.ListGalleries.item(wdNumberGallery).LinkedStyle := '自定标题';
wordapp.ActiveDocument.Styles.item('自定标题').LinkToListTemplate(ListTemplate := wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1), ListLevelNumber := 1);
end;
发表评论
-
将C++ 转为 Pascal/Delphi -- 转
2011-07-23 00:39 2955将C++ 转为 Pascal/Delphi ===== ... -
Delphi编程注意事项--转
2011-07-23 00:35 1278Delphi编程注意事项 任何单元必须有对应测试 ... -
Delphi循环语句对应的汇编语句序列-- 转
2011-07-23 00:33 1227count: 终值, start:起始值正向: ... -
Delphi7快捷键--转
2011-07-21 23:43 1719分类 快捷键 解释 ... -
Delphi写数据至WORD--转
2011-07-21 22:27 33791.所需的三个控件: ChooseWA: ... -
如何用DELPHI实现把WORD、EXCEL和图片等存储到数据库中--转
2011-07-21 22:06 3024用image字段保存这些文档。 var ... -
delphi 7实现word文档的分页读取
2011-07-21 22:03 1802问题仔细描述,如果 ... -
Delphi中的数据添加到Word模板的相应位置--转
2011-07-21 22:01 1622就跟将数据导入Excel一样,在运行Delph ... -
delphi控制 word的几种方法--转
2011-07-21 21:49 2339对几种方法的难易程度的判别 a.通过Delphi的控件TOl ... -
Delphi控制Word的报表例子介绍--转
2011-07-21 21:46 2706说明:WordApp是Server下的TWordAppl ... -
delphi操作word -- 转
2011-04-25 17:14 1361转自 http://xxzqb.blog.163.com/ ... -
delphi常见属性事件说明
2010-07-20 21:54 1303DELPHI常见属性说明:align 设置组件对齐(同 ... -
C,Delphi,PHP 基础语法对比[转载]
2010-07-20 20:40 944说明 C(区分大小写) ... -
DELPHI控件安装与删除
2010-07-19 22:49 2400DELPHI控件安装与删除控件安装 基本安装 1、对于单个控件 ... -
『Delphi』File not found的解决办法
2010-07-19 22:48 2657当程序启动,提示Fatal Erro:File not fou ... -
Delphi StringGrid控件的属性及使用说明[转载]
2010-07-19 21:01 5881Delphi StringGrid控件的属 ...
相关推荐
Delphi实现Word、PDF文档转Image;图片大小可自定义。效果非常好。自己写的,已经用在项目上的。不错的资源。
将word文档转换为txt文件,并保存至本地。
Delphi开发的Word文档批量处理程序,可批量Word文字替换,批量字体修改、批量插入图片,批量合并Word文档、删除指定页等功能,还可以批量新建文档。关于本程序的使用说明: 1、系统将根据样版文件复制成多个文件;...
Delphi操作word文档,实现word功能
delphi 显示 word 文档内容
Delphi版Word文档批量合并、文字替换、修改、插入图片程序
Delphi 将Word文档转换为txt格式,程序是将word 存储为TXT格式,但其实是经过了转换,因为TXT是纯文本格式,不可能直接存的,需要经过一系列处理,去除格式,以下代码完成此项功能: MSWord := CreateOLEObject('...
Delphi中使用Olecontainer打开Word文档后,并实现打印功能
Delphi代码,实现了对Word内容的读取,代码中是按段落读取!
用dephi实现读取Word文档功能,内有源码程序
delphi控制word文档搜索,搜索文件夹下的Doc,rtl和txt文件
这个Delphi源码主要实现创建一个Word文档,且不使用任何的第三方控件,运行效果截图所示。 实现创建Word文档的功能原来也是挺简单的,理解下面几行代码即可了,不过只是创建,不包括写入内容: procedure TForm1...
delphi 将Word文档转化为TXT,读取word中的文字信息,并在Memo中显示所有的文本信息。
在delphi中使用createoleobject方法对word...这个程序很简单,在页面上放置了一个edit和一个button,每单击一次按钮,就会自动把edit中的内容添加在后台中的word文档中,程序关闭时文件自动保存在当前程序的主目录中。
在delphi中读取word文档,并将文档分页显示。
DELPHI 2010 调用word,直接在程序中显示word 的信息。
delphi 将word 转换成txt
Delphi 打开已有的word文档,如果你的电脑上安装有Word,则会通过Word打开用户选择的文档。其实就是在Delphi窗口中选择你要打开的Word文档,用户确定后,Delphi会调用安装好的word打开该文件,有兴趣参考以下代码: ...
在delphi中读取word文档,显示缩略图并将文档分页显示。 在csdn 中下载了好几个都不能使用,1.数据存在问题,2.docx格式的word文档提取时,结束符判断错误,该程序包修正了以上两处错误,程序中的一些算法可以参考...
应同事的需求,用Delphi7制作了一个Word文档合并器,这是源码。