WORD文档添加水印

通过程序将png图片,写到word里



Var

  StrTemp : String;
  ZS : Integer;
  Nian, Yue, Ri : Word;

  ItemIndex :OleVariant;
  FileName, ConfirmConversions, ReadOnly, AddToRecentFiles,
  PasswordDocument, PasswordTemplate, Revert,
  WritePasswordDocument, WritePasswordTemplate, Format: OleVariant;

  FindText, MatchCase, MatchWholeWord, MatchWildcards, MatchSoundsLike,
  MatchAllWordForms, Forward, Wrap, ReplaceWith, Replace: OleVariant;

  SaveChanges, OriginalFormat, RouteDocument: OleVariant;

  linkflag,saveflag,prange,a,b,c:OleVariant;

  Filename1:wideString;
  OleVar:OLEVariant;


begin
  FileName := Edit2.Text;
  try
    // WordApplication1.Disconnect;
    WordApplication1.Connect;
  except
    Application.MessageBox('连接WORD服务器失败,请确定您已经正确安装。','错误框',MB_OK+MB_ICONSTOP);
    Abort;
  end;

全部代码可以到

http://www.xszlo.com/article/2012-10-11/7470.html

查看

你可能感兴趣的:(xszlo.com)