a亚洲精品_精品国产91乱码一区二区三区_亚洲精品在线免费观看视频_欧美日韩亚洲国产综合_久久久久久久久久久成人_在线区

首頁 > 編程 > Delphi > 正文

Delphi操作Wrod的幾個知識點

2019-11-18 18:01:41
字體:
來源:轉載
供稿:網友
 

//-------------------初始化--------------------

 var
  wApp,work:Variant;

  try
   wApp:=GetActiveOleObject('Word.application');
  except
   wApp:=CreateOleObject('word.Application');
  end;

//---------------替換字符--------------------

  wApp.selection.find.text:='<%a2%>';
  wApp.selection.find.replacement.text:=lb;
  wApp.selection.find.execute(replace:=wdReplaceAll);

//----------------------隱藏WORD菜單和工具欄----------------------

if OC.State in [osUIActive]  then 
 begin
  OC.OleObjectInterface.QueryInterface(IOleInPlaceObject,IOO);
  IOO.UIDeactivate;
  IOO :=nil;
 end;

//-----------------根據書簽導數據------

 wApp.Selection.GoTo(What:=wdGoToBookmark,Name:='ZCZD'+IntToStr(i));
  wApp.Selection.typetext('■')

//-------------------生成頁眉頁腳并寫入數據----------

  wApp.Selection.GoTo(What:=wdGoToPage, Which:=wdGoToNext, Name:='FLAG');
  If wApp.ActiveWindow.View.SplitSpecial <> wdPaneNone Then
      wApp.ActiveWindow.Panes(2).Close;
  If (wApp.ActiveWindow.ActivePane.View.Type = wdNormalView) Or (wApp.ActiveWindow.ActivePane.View.Type = wdOutlineView) Then
      wApp.ActiveWindow.ActivePane.View.Type := wdPRintView;
  wApp.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader;
  wApp.Selection.ParagraphFormat.Borders.item(wdBorderLeft).LineStyle := wdLineStyleNone;
  wApp.Selection.ParagraphFormat.Borders.item(wdBorderRight).LineStyle := wdLineStyleNone;
  wApp.Selection.ParagraphFormat.Borders.item(wdBorderTop).LineStyle := wdLineStyleNone;
  wApp.Selection.ParagraphFormat.Borders.item(wdBorderBottom).LineStyle := wdLineStyleNone;
  wApp.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageFooter;
  wApp.Selection.ParagraphFormat.Alignment := wdAlignParagraphRight;
  if (DM.XM_DS.FieldByName('tg_flag').AsInteger = 2) and (DM.XM_DS.FieldByName('tj_flag').AsInteger = 0) then
    wApp.Selection.TypeText(Text:='合`格`任`務`書')
  else
    wApp.Selection.TypeText(Text:='不合格任務書');
  wApp.ActiveWindow.ActivePane.View.SeekView := wdSeekMainDocument;



上一篇:如何在delphi5中實現對word文檔頁眉的設置?

下一篇:在Delphi中利用CreateRemoteThread遠程注入例子

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
學習交流
熱門圖片

新聞熱點

疑難解答

圖片精選

網友關注

主站蜘蛛池模板: 婷婷久久综合 | 亚洲欧美在线综合 | 欧美性福 | 成人不卡一区二区 | 亚洲成年 | 久久久久av | 日韩资源在线 | 精品久久久久久亚洲精品 | 成人中文视频 | 日韩一区二区视频在线观看 | 亚洲国产成人久久综合一区,久久久国产99 | 日韩中文字幕电影在线观看 | 国产不卡在线观看 | 久久亚洲视频 | 国产精品自产拍在线观看桃花 | 中文字幕av第一页 | 欧美二区在线观看 | 欧美日韩高清在线一区 | 欧美日韩艺术电影在线 | 国产中文在线 | 妞干网免费在线视频 | 999久久久 | 97国产在线视频 | 久久伊人精品视频 | 少妇一区二区三区免费观看 | 欧美一区二区三区黄色 | www.久久久精品 | 欧美极品一区二区 | 欧美日韩一区在线 | 波多野结衣一二三区 | 日韩 国产 在线 | 在线观看av片 | 成人免费视频网址 | 亚洲视频在线观看一区二区三区 | 成人毛片在线免费看 | 国产一区二区毛片 | 人人艹人人 | 欧美在线 | 青青草欧美 | 亚洲视频一区二区在线 | 中文字幕毛片 |