Delphi+Word解决方案参考

delphi中OleContainer加载word文档的几个问题 在delphi中有时候需要将word文档以数据流的形式保存到数据库中然后展现出来,同时又需要修改word文档进行实时保存。以下以例子展示 1.通过oleContainer导入外部word文档并保存为数据流 procedure   LoadWordToStrem; var   sFile :string;   vStream :TMemoryStream; beg 阅读详情
 

Delphi+Word解决方案参考

这是我做项目过程中自己做的几个函数,见到大家都在问Word的问题。现在拿出来和大家共享。(希望有朋友可以进一步添加新的功能,或者做成包或者lib等,更方便大家使用。我自己是没有时间啦,呵呵)

使用前,先根据需要建立一个空的WORD文件作为模板,在模板文件中设置好各种格式和文本。另外,其中的PrnWordTable的参数是TDBGridEh类型的控件,取自Ehlib2.6

其中用到的shFileCopy函数(用于复制文件)和guiInfo函数(用于显示消息框)也是自己编写的,代码也附后。

 

示范代码如下:

 

代码完成的功能:

1.         替换打印模板中的“#TITLE#”文本为“示范代码1”

2.         并且将DBGridEh1控件当前显示的内容插入到文档的末尾

3.         在文档末尾插入一个空行

4.         在文档末尾插入新的一行文本

5.         将文档中的空行去掉

 

  if PrnWordBegin('C:/打印模板.DOC','C:/目标文件1.DOC') then

  begin

    PrnWordReplace('#TITLE#','示范代码1');

    PrnWordTable(DBGridEh1);

    PrnWordInsert('');

    PrnWordInsert('这是新的一行文本');

    PrnWordReplace('^p^p','^p',true);

    PrnWordSave;

  end;

 

源代码如下:

 

//Word打印(声明部分)

 

    wDoc,wApp:Variant;

    function PrnWordBegin(tempDoc,docName:String):boolean;

    function PrnWordReplace(docText,newText:String;bSimpleReplace:boolean=false):boolean;

    function PrnWordInsert(lineText:String;bNewLine:boolean=true):boolean;overload;

    function PrnWordInsert(var imgInsert:TImage;sBookMark:String=''):boolean;overload;

    function PrnWordInsert(var chartInsert:TChart;sBookMark:String=''):boolean;overload;

    function PrnWordTable(var dbG:TDBGridEh;sBookMark:String=''):boolean;

    procedure PrnWordSave;

    procedure PrnWordEnd;

 

//Word打印(实现部分)

 

{

功能:基于模板文件tempDoc新建目标文件docName并打开文件

}

function PrnWordBegin(tempDoc,docName:String):boolean;

begin

  result:=false;

  //复制模版

  if tempDoc<>'' then

    if not shFileCopy(tempDoc,docName) then exit;

  //连接Word

  try

    wApp:=CreateOleObject('Word.Application');

  except

    guiInfo('请先安装 Microsoft Word 。');

    exit;

  end;

  try

    //打开

    if tempDoc='' then

    begin

      //创建新文档

      wDoc:=wApp.Document.Add;

      wDoc.SaveAs(docName);

    end else begin

      //打开模版

      wDoc:=wApp.Documents.Open(docName);

    end;

  except

    guiInfo('打开模版失败,请检查模版是否正确。');

    wApp.Quit;

    exit;

  end;

  wApp.Visible:=true;

  result:=true;

end;

 

{

功能:使用newText替换docText内容

bSimpleReplace:true时仅做简单的替换,false时对新文本进行换行处理

}

function PrnWordReplace(docText,newText:String;bSimpleReplace:boolean=false):boolean;

var i:Integer;

begin

  if bSimpleReplace then

  begin

    //简单处理,直接执行替换操作

  try

    wApp.Selection.Find.ClearFormatting;

    wApp.Selection.Find.Replacement.ClearFormatting;

    wApp.Selection.Find.Text := docText;

    wApp.Selection.Find.Replacement.Text :=newText;

    wApp.Selection.Find.Forward := True;

    wApp.Selection.Find.Wrap := wdFindContinue;

    wApp.Selection.Find.Format := False;

    wApp.Selection.Find.MatchCase := False;

    wApp.Selection.Find.MatchWholeWord := true;

    wApp.Selection.Find.MatchByte := True;

    wApp.Selection.Find.MatchWildcards := False;

    wApp.Selection.Find.MatchSoundsLike := False;

    wApp.Selection.Find.MatchAllWordForms := False;

    wApp.Selection.Find.Execute(Replace:=wdReplaceAll);

    result:=true;

  except

    result:=false;

  end;

    exit;

  end;

  //自动分行

  reWord.Lines.Clear;

  reWord.Lines.Add(newText);

  try

    //定位到要替换的位置的后面

    wApp.Selection.Find.ClearFormatting;

    wApp.Selection.Find.Text := docText;

    wApp.Selection.Find.Replacement.Text := '';

    wApp.Selection.Find.Forward := True;

    wApp.Selection.Find.Wrap := wdFindContinue;

    wApp.Selection.Find.Format := False;

    wApp.Selection.Find.MatchCase := False;

    wApp.Selection.Find.MatchWholeWord := False;

    wApp.Selection.Find.MatchByte := True;

    wApp.Selection.Find.MatchWildcards := False;

    wApp.Selection.Find.MatchSoundsLike := False;

    wApp.Selection.Find.MatchAllWordForms := False;

    wApp.Selection.Find.Execute;

    wApp.Selection.MoveRight(wdCharacter,1);

    //开始逐行插入

    for i:=0 to reWord.Lines.Count-1 Do

    begin

      //插入当前行

      wApp.Selection.InsertAfter(reWord.Lines[i]);

      //除最后一行外,自动加入新行

      if i<reWord.Lines.Count-1 then

        wApp.Selection.InsertAfter(#13);

    end;

    //删除替换位标

    wApp.Selection.Find.ClearFormatting;

    wApp.Selection.Find.Replacement.ClearFormatting;

    wApp.Selection.Find.Text := docText;

    wApp.Selection.Find.Replacement.Text := '';

    wApp.Selection.Find.Forward := True;

    wApp.Selection.Find.Wrap := wdFindContinue;

    wApp.Selection.Find.Format := False;

    wApp.Selection.Find.MatchCase := False;

    wApp.Selection.Find.MatchWholeWord := true;

    wApp.Selection.Find.MatchByte := True;

    wApp.Selection.Find.MatchWildcards := False;

    wApp.Selection.Find.MatchSoundsLike := False;

    wApp.Selection.Find.MatchAllWordForms := False;

    wApp.Selection.Find.Execute(Replace:=wdReplaceAll);

    result:=true;

  except

    result:=false;

  end;

end;

 

{

功能:打印TDBGridEh当前显示的内容

基于TDBGridEh控件的格式和内容,自动在文档中的sBookMark书签处生成Word表格

目前能够支持单元格对齐、多行标题(两行)、底部合计等特性

sBookMark:Word中要插入表格的书签名称

}

function PrnWordTable(var dbG:TDBGridEh;sBookMark:String=''):boolean;

var iCol,iLine,i,j,k:Integer;

    wTable,wRange:Variant;

    iRangeEnd:longint;

    iGridLine,iTitleLine:Integer;

    getTextText:String;getTextDisplay:boolean;

    titleList:TStringList;titleSplit,titleCol:Integer;lastTitleSplit,SubTitle:Integer;lastTitle:String;

begin

  result:=false;

  try

    //计算表格的列数(不包括隐藏的列)

    iTitleLine:=1;  //始终默认为1

    iCol:=0;

    for i:=0 to dbG.Columns.Count-1 Do

    begin

      if dbG.Columns[i].Visible then

      begin

        iCol:=iCol+1;

      end;

    end;

    //计算表格的行数(不包括隐藏的列)

    if dbG.DataSource.DataSet.Active then

      iLine:=dbG.DataSource.DataSet.RecordCount

    else

      iLine:=0;

    iGridLine:=iLine+iTitleLine+dbG.FooterRowCount;

    //定位插入点

    if sBookMark='' then

    begin

      //在文档末尾

      iRangeEnd:=wDoc.Range.End-1;

      if iRangeEnd<0 then iRangeEnd:=0;

      wRange:=wDoc.Range(iRangeEnd,iRangeEnd);

    end else begin

      //在书签处

      wRange:=wDoc.Range.Goto(wdGoToBookmark,,,sBookMark);

    end;

    wTable:=wDoc.Tables.Add(wRange,iGridLine,iCol);

    wTable.Columns.AutoFit;

    //标题行

    k:=1;

    for j:=1 to dbG.Columns.Count Do

    begin

      if dbG.Columns[j-1].Visible then

      begin

        if dbG.UseMultiTitle then

        begin

          titleList:=strSplit(dbG.Columns[j-1].Title.Caption,'|');

          wTable.Cell(1,k).Range.InsertAfter(titleList.Strings[0]);

        end else

          wTable.Cell(1,k).Range.InsertAfter(dbG.Columns[j-1].Title.Caption);

        //设置单元格对齐方式

        if dbG.Columns[j-1].Title.Alignment=taCenter then

          wTable.Cell(1,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphCenter

        else if dbG.Columns[j-1].Title.Alignment=taRightJustify then

          wTable.Cell(1,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphRight

        else if dbG.Columns[j-1].Title.Alignment=taLeftJustify then

          wTable.Cell(1,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphJustify;

        k:=k+1;

      end;

    end;

    //填写每一行

    if iLine>0 then

    begin

      dbG.DataSource.dataset.DisableControls;

      dbG.DataSource.DataSet.First;

      for i:=1 to iLine Do

      begin

        k:=1;

        for j:=1 to dbG.Columns.Count Do

        begin

          if dbG.Columns[j-1].Visible then

          begin

            if dbG.Columns[j-1].FieldName<>'' then //避免由于空列而出错

            begin

              //如果该列有自己的格式化显示函数,则调用显示函数获取显示串

              getTextText:='';

              if Assigned(dbG.DataSource.DataSet.FieldByName(dbG.Columns[j-1].FieldName).OnGetText) then

              begin

                dbG.DataSource.DataSet.FieldByName(dbG.Columns[j-1].FieldName).OnGetText(dbG.DataSource.DataSet.FieldByName(dbG.Columns[j-1].FieldName),getTextText,getTextDisplay);

                wTable.Cell(i+iTitleLine,k).Range.InsertAfter(getTextText);

              end else begin

                //使用数据库内容显示

                wTable.Cell(i+iTitleLine,k).Range.InsertAfter(dbG.DataSource.DataSet.FieldByName(dbG.Columns[j-1].FieldName).AsString);

              end;

            end;

            //设置单元格对齐方式

            if dbG.Columns[j-1].Alignment=taCenter then

              wTable.Cell(i+iTitleLine,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphCenter

            else if dbG.Columns[j-1].Alignment=taRightJustify then

              wTable.Cell(i+iTitleLine,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphRight

            else if dbG.Columns[j-1].Alignment=taLeftJustify then

              wTable.Cell(i+iTitleLine,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphJustify;

            k:=k+1;

          end;

        end;

        dbG.DataSource.DataSet.Next;

      end;

    end;

    //结尾行

    for i:=1 to dbG.FooterRowCount Do

    begin

      k:=1;

      for j:=1 to dbG.Columns.Count Do

      begin

        if dbG.Columns[j-1].Visible then

        begin

          wTable.Cell(iLine+1+i,k).Range.InsertAfter(dbG.GetFooterValue(i-1,dbG.Columns[j-1]));

          //设置单元格对齐方式

          if dbG.Columns[j-1].Footer.Alignment=taCenter then

            wTable.Cell(iLine+1+i,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphCenter

          else if dbG.Columns[j-1].Footer.Alignment=taRightJustify then

            wTable.Cell(iLine+1+i,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphRight

          else if dbG.Columns[j-1].Footer.Alignment=taLeftJustify then

            wTable.Cell(iLine+1+i,k).Range.ParagraphFormat.Alignment:=wdAlignParagraphJustify;

          k:=k+1;

        end;

      end;

    end;

    //处理多行标题

    if dbG.UseMultiTitle then

    begin

      //先分割单元格,再逐个填入第二行

      k:=1;

      titleCol:=1;

      lastTitleSplit:=1;

      SubTitle:=0;

      lastTitle:='';

      for j:=1 to dbG.Columns.Count Do

      begin

        if dbG.Columns[j-1].Visible then

        begin

          titleList:=strSplit(dbG.Columns[j-1].Title.Caption,'|');

          if titleList.Count>1 then

          begin

            //处理第二行以上的内容

            wTable.Cell(1,k-SubTitle).Range.Cells.Split(titleList.Count,1,false);

            for titleSplit:=1 to titleList.Count-1 Do

            begin

              wTable.Cell(titleSplit+1,titleCol).Range.InsertAfter(titleList.Strings[titleSplit]);

            end;

            titleCol:=titleCol+1;

            //处理第一行合并

            if (lastTitleSplit=titleList.Count) and (lastTitle=titleList.Strings[0]) then

            begin

              //内容相同时,合并单元格

              wTable.Cell(1,k-SubTitle).Range.Copy;

              wRange:=wDoc.Range(wTable.Cell(1,k-SubTitle-1).Range.Start,wTable.Cell(1,k-SubTitle).Range.End);

              wRange.Cells.Merge;

              wRange.Paste;

              SubTitle:=SubTitle+1;

            end;

          end;

          lastTitle:=titleList.Strings[0];

          lastTitleSplit:=titleList.Count;

          titleList.Clear;titleList.Free;

          k:=k+1;

        end;

      end;

    end;

    //自动调整表格

    wTable.AutoFitBehavior(1);//根据内容自动调整表格wdAutoFitContent

    wTable.AutoFitBehavior(2);//根据窗口自动调整表格wdAutoFitWindow

    result:=true;

  except

    result:=false;

  end;

  try

    dbG.DataSource.dataset.EnableControls;

  except

  end;

end;

 

{

功能:在Word文件中插入文本(能够自动进行换行处理)

lineText:要插入的文本

bNewLine:true时新起一行,false时在当前行插入

}

function PrnWordInsert(lineText:String;bNewLine:boolean=true):boolean;

var i:Integer;

begin

  try

    if bNewLine then

      wDoc.Range.InsertAfter(#13);

    //自动分行

    reWord.Lines.Clear;

    reWord.Lines.Add(lineText);

    //开始逐行插入

    for i:=0 to reWord.Lines.Count-1 Do

    begin

      //插入当前行

      wDoc.Range.InsertAfter(reWord.Lines[i]);

      //除最后一行外,自动加入新行

      if i<reWord.Lines.Count-1 then

        wDoc.Range.InsertAfter(#13);

    end;

    result:=true;

  except

    result:=false;

  end;

end;

 

{

功能:在Word文件的sBookMark书签处插入TImage控件包含的图片

}

function PrnWordInsert(var imgInsert:TImage;sBookMark:String=''):boolean;

var wRange:Variant;iRangeEnd:Integer;

begin

  try

    if sBookMark='' then

    begin

      //在文档末尾

      iRangeEnd:=wDoc.Range.End-1;

      if iRangeEnd<0 then iRangeEnd:=0;

      wRange:=wDoc.Range(iRangeEnd,iRangeEnd);

    end else begin

      //在书签处

      wRange:=wDoc.Range.Goto(wdGoToBookmark,,,sBookMark);

    end;

    if imgInsert.Picture.Graphic<>nil then

    begin

      Clipboard.Assign(imgInsert.Picture);

      wRange.Paste;

    end else begin

      wRange.InsertAfter('照片');

    end;

    result:=true;

  except

    result:=false;

  end;

end;

 

{

功能:在书签sBookMark处插入TChart控件包含的图表

}

function PrnWordInsert(var chartInsert:TChart;sBookMark:String=''):boolean;

var wRange:Variant;iRangeEnd:Integer;

begin

  try

    if sBookMark='' then

    begin

      //在文档末尾

      iRangeEnd:=wDoc.Range.End-1;

      if iRangeEnd<0 then iRangeEnd:=0;

      wRange:=wDoc.Range(iRangeEnd,iRangeEnd);

    end else begin

      //在书签处

      wRange:=wDoc.Range.Goto(wdGoToBookmark,,,sBookMark);

    end;

    chartInsert.CopyToClipboardBitmap;

    wRange.Paste;

    result:=true;

  except

    result:=false;

  end;

end;

 

{

功能:保存Word文件

}

procedure PrnWordSave;

begin

  try

    wDoc.Save;

  except

  end;

end;

 

{

功能:关闭Word文件

}

procedure PrnWordEnd;

begin

  try

    wDoc.Save;

    wDoc.Close;

    wApp.Quit;

  except

  end;

end;

 

附:shFileCopy源代码

 

{

功能:安全的复制文件

srcFile,destFile:源文件和目标文件

bDelDest:如果目标文件已经存在,是否覆盖

返回值:true成功,false失败

}

function shFileCopy(srcFile,destFile:String;bDelDest:boolean=true):boolean;

begin

  result:=false;

  if not FileExists(srcFile) then

  begin

    guiInfo ('源文件不存在,不能复制。'+#10#13+srcFile);

    exit;

  end;

  if srcFile=destFile then

  begin

    guiInfo ('源文件和目标文件相同,不能复制。');

    exit;

  end;

  if FileExists(destFile) then

  begin

    if not bDelDest then

    begin

      guiInfo ('目标文件已经存在,不能复制。'+#10#13+destFile);

      exit;

    end;

    FileSetAttr(destFile,FileGetAttr(destFile) and not $00000001);

    if not DeleteFile(PChar(destFile)) then

    begin

      guiInfo ('目标文件已经存在,并且不能被删除,复制失败。'+#10#13+destFile);

      exit;

    end;

  end;

  if not CopyFileTo(srcFile,destFile) then

  begin

    guiInfo ('发生未知的错误,复制文件失败。');

    exit;

  end;

  //目标文件去掉只读属性

  FileSetAttr(destFile,FileGetAttr(destFile) and not $00000001);

  result:=true;

end;

 

附:guiInfo源代码

 

{

功能:封装了各种性质的提示框

sMsg:要提示的消息

}

procedure guiInfo(sMsg:String);

begin

  MessageDlg(sMsg,mtInformation,[mbOK],0);

end;

 

Delphi 7控制Word 2000生成文档的完整实现方法 Delphi 7作为经典的Windows应用开发工具,具备强大的COM编程支持,能够高效地与外部自动化服务器进行交互。Word 2000则作为微软Office系列的重要组件,提供了丰富的COM接口,允许开发者通过编程方式控制其文档创建、格式设置与内容管理。通过Delphi调用Word的COM对象模型,开发者可以实现自动化文档生成、报表输出、合同模板填充等功能,极大提升办公自动化效率。 阅读详情

相关推荐

delphi不用控件导出Word文档,可以导出表格到word

利用delphi的字符串,导出Word文档,可以导出表格到word。方法超简单,没什么技术含量,勿喷。不用任何控件(包括第三方控件和自带控件),附带一个例子。 编程重在方法,希望对你有所帮助。

将Word嵌入Delphi中

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://bigpower.blog.51cto.com/209892/90287 unit Main;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Fo

iseekcode的专栏 869

DELPHI 表格控件DBGridEh史上最全使用资料

DELPHI 表格控件DBGridEh史上最全使用资料 DELPHI 表格控件DBGridEh史上最全使用资料

Delphi与Ole,Word,Excel,查找与替换等

Delphi与Word之间的融合技术(下)zt 来自:yzhshi, 时间:2002-2-2 14:24:00, ID:902680 前面我就Delphi中调用Word写了一些,比较注重于具体实现,对于研究的方法则说的比较片面。 今天晚上,我静下心来,总结了一下怎样在Delphi中生成操作Word的代码。如果说前面我写的 是金子,那么下面这篇文章就是点石成金的手指(太自夸了,呵呵)。毕竟已...

weixin_34068198的博客 1106

delphi读取word文档

用dephi实现读取Word文档功能,内有源码程序

Delphi7.0 操作word填写表格

一段原创Delphi7.0 操作word进行word文件表格填写的代码,本人业余爱好者,如有错误,敬请诸位大猿指出。

Delphi 读取&预览Word文档内容

预览(转换成rtf文件加载到richedit)

xiaobin_zb的博客 2230

delphi 读取Word

将word中不规则的表格数据转换为标准的表格,即合并的单元格按正常格式解析

Delphi+Word解决方案参考

 Delphi+Word解决方案参考    使用前,先根据需要建立一个空的WORD文件作为模板,在模板文件中设置好各种格式和文本。另外,其中的PrnWordTable的参数是TDBGridEh类型的控件,取自Ehlib2.6    其中用到的shFileCopy函数(用于复制文件)和guiInfo函数(用于显示消息框)也是自己编写的,代码也附后。示范代码如下:    代码完成的功能

bestxy 1261

告别重复劳动:用Python+pywinauto打造你的微信个人助理(自动回复/收款/定时发消息)

本文介绍如何利用Python和pywinauto库构建微信个人助手,实现自动回复、定时消息、智能收款等功能,告别重复劳动。通过详细的代码示例和配置指南,帮助开发者快速掌握微信自动化技术,提升工作效率。

weixin_42568801的博客 332

江科大51单片机笔记【1】单片机及开发板介绍

单片机,Micro Controller Unit,简称MCU,内部集成了CPU、RAM、ROM、定时器、中断系统、通讯接口等一系列电脑的常用硬件功能单片机的任务是信息采集(传感器)、处理(CPU)和硬件设备(电机、LED)的控制单片机算是一个袖珍版计算机,是一个完整的计算机系统,成本低体积小结构简单单片机的使用领域:智能仪表、实时工控、通讯设备、导航系统、家用电器等。

2301_80195807的博客 851

Delphi+Word解决方案参考 (转)

Delphi+Word解决方案参考 (转)[@more@] Delphi+word解决方案参考XML:namespace prefix = o ns = "urn:schemas-microsoft-com:Office:...

ciya3282的博客 326

深入解析高通Adreno DPU的DRM/KMS驱动架构与硬件协同设计

本文深入解析了高通Adreno DPU的DRM/KMS驱动架构与硬件协同设计,详细介绍了Adreno DPU的核心模块组成、显示接口设计以及DRM驱动架构。通过实际案例和调试技巧,帮助开发者理解硬件与软件的协同工作原理,优化显示性能并解决常见问题。

weixin_29266679的博客 440

Delphi与Word之间的融合技术

Delphi与Word之间的融合技术yzhshi@263.net一、VBA代码含义Microsoft Word是一个集成化环境,是美国微软公司的字处理系统,但是它决不仅仅是一个字处理系统,它集成了Microsoft Visual Basic,可以通过编程来实现对Word功能的扩展。Microsoft Visual Basic在word中的代码即Word的宏,通过编写Word宏,可实现一些文档处理的

cwxiao888的专栏 1710

STM32硬件SPI驱动ADS1220实战:从零搭建高精度数据采集系统(附避坑指南)

本文详细介绍了使用STM32硬件SPI驱动24位高精度ADC芯片ADS1220的完整实战方案。内容涵盖从硬件设计、CubeMX工程配置、SPI通信底层实现到数据读取策略与性能优化的全流程,并重点分享了多通道切换、噪声抑制等关键避坑指南,帮助开发者构建稳定可靠的高精度数据采集系统。

o4p5q6r7s的博客 455

Halcon 色彩标定:RGB空间下实现白平衡与CCM矩阵合成静态HDR图像

摘要 本文介绍了一种基于Halcon的色彩校正方法,结合白平衡与灰轴约束最小二乘法实现精准颜色还原。方法分为三步:1)自动定位色卡区域并提取灰阶块计算白平衡增益;2)通过前三列色块建立测量值与标准值的映射关系;3)引入灰轴约束条件求解色彩校正矩阵(CCM),确保中性灰区域不偏色。算法采用中位数计算白平衡增益以提高鲁棒性,并通过旋转校正处理色卡倾斜问题。实验表明,该方法能有效消除相机采集的系统色偏,适用于颜色测量、表面检测等机器视觉场景。文末提供了完整代码实现。

LIN943168247的博客 407

如何在Delphi里面利用Word的VBA代码进行一些总结

1、  生成VBA代码。Word本身具有很强的可扩展性,尤其是支持用户自定义功能,其实现 的主要方式就是通过VBA代码来实现的。在“工具->宏->Visual Basic编辑器”里面就可以看 到具体的宏代码,可以直接进行编辑。而且还可以使用录制宏的功能自动生成宏代码。方法是 选择“工具->宏->录制新宏”,然后执行自己想通过程序实现的功能,如存盘、打印等功能, 此时Word一边执行你要实现功能,一

天下文章一大抄,只有做得好,没有抄的好! 2959

【踩坑记录】colmap中的相机位姿的坐标系定义及其可视化结果的隐含转换

1 坐标系定义及转换   首先介绍一下世界坐标系和相机坐标系之间的转换,它们之间是存在一个转换关系的。现假设空间中一点X,它在相机坐标系下的坐标是Xcamera,在世界坐标系下的坐标是Xworld。假设它通过R和t实现从相机坐标系到世界坐标系之间的转换: Xworld = RXcamera + t   那么,由上式,我们可以推得从世界坐标系向相机坐标系的转换关系(RT=R-1,所以通常直接使用RT即可): Xcamera = RTXworld - RTt   所以,两个坐标系之间的转换,需要看其具体

zeeq的博客 2万+

delphi 10.2 操作word  文档 向 书签位置插入 文字 或者插入图片 实现代码 供大家参考

delphi 10.2 操作word 文档 向 书签位置插入 文字 或者插入图片 实现代码 供大家参考 unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Buttons, StdCtrls, OleCtn...

qq_17029305的博客 1048

【C++】DDS:FastDDS环境配置与使用示例

FastDDS环境配置与使用示例

DevFrank的博客 6513

Linux系统之部署经典魔塔小游戏

Linux系统之部署经典魔塔小游戏

jks212454的博客 1823
下一篇: SQLServer 工具箱(脚本排序+清除日志+更多实用功能)
happyprogram
博客等级 码龄25年 1粉丝 3原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值