本站首页    管理页面    写新日志    退出


«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31


公告
================

注会练习软件
http://www.cpasoft.com.cn
我的注会软件官网

http://blog.163.com/abc7105@126/

 

 


哈哈,热爱快“过气”的DELPHI


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:注册会计师(注会)练习软件
日志总数:398
评论数量:116
留言数量:27
访问次数:3265571
建立时间:2005年6月6日




[delpih编程]vba解决 :邮件合并时打开文件不提示“打开此文档将运行下列SQL命令”
软件技术

吕向阳 发表于 2011/5/15 10:59:22

当然要在vba中加入如下代码,并在工具引用中加入对windows script host object modal的引用。
下为函数

Sub 不提示sql()
    Dim 注册表主键 As String
    Dim 工程名称 As String
    Dim 注册表项 As String
    Dim 注册表键名 As Variant
    Dim 注册表键值 As Variant
    Dim arr As Variant
  


阅读全文(2229) | 回复(0) | 编辑 | 精华 | 删除
 


[delpih编程]lxy7105
(需密码) 软件技术

吕向阳 发表于 2011/5/14 22:48:36



阅读全文(1579) | 回复(0) | 编辑 | 精华 | 删除
 


[delpih编程]delphi 为word文档增加一个段落样式
软件技术

吕向阳 发表于 2011/4/10 21:32:30

下为程序中的一段,解决了为文档增加一个段落样式。这个段落样式的基础样式为“标题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;<

阅读全文(1189) | 回复(0) | 编辑 | 精华 | 删除
 


[delpih编程]delphi 增加一个类vba中的CentimetersToPoints函数
软件技术

吕向阳 发表于 2011/4/10 21:29:55

function TForm1.CentimetersToPoints(xCentimeters: real): Real;
begin
  result := xCentimeters * 28.35;
end;

阅读全文(1422) | 回复(0) | 编辑 | 精华 | 删除
 


[delpih编程]delphi关闭原先已被打开的word文档的函数
软件技术

吕向阳 发表于 2011/4/10 21:27:17

procedure TForm1.closedoc(filename: string);

var
  H: THandle;
  P: DWORD;
  afile: string;

begin
  afile := ExtractFileName(filename);

  H := FindWindow(nil, PChar(afile + ' - Microsoft Word'));

  if H <> 0 then
  begin
    GetWindowThreadProcessId(H, @P);<

阅读全文(1131) | 回复(0) | 编辑 | 精华 | 删除
 


[delpih编程]delphi 对word编程的几个小体会
软件技术

吕向阳 发表于 2011/4/10 21:24:02

目前正在用delphi写一款excel表格转word文档的小软件,在写的过程中摸索到一些小技巧

1)、 adoc.application.Selection.Borders.item(wdBorderVertical).LineStyle := wdLineStyleDot;

比如原来的对象集Borders,就不能用borders(wdBorderVertical)表示其中的子对象,而应用Borders.item(wdBorderVertical)来表示。在delphi中的这个操作与vba中的是有明显区别的,与此类似的,还有如下
 wordapp.ActiveDocument.Styles.item('自定标题').Font.Bold := True;

  wordapp.ListGalleries.item(wdNumberGallery).ListTemplates.item(1).ListLevels.item(1).NumberFormat 

阅读全文(1554) | 回复(0) | 编辑 | 精华 | 删除
 


« 1 2 3 4 5 6 7 8 9 10 »



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.367 second(s), page refreshed 144766742 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号