麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 編程 > 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遠程注入例子

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

新聞熱點

疑難解答

圖片精選

網友關注

主站蜘蛛池模板: 偷偷草网站 | 草草久久久 | 92看片淫黄大片一级 | 日韩视频在线不卡 | 精品国产91久久久久久久 | 久久国产亚洲精品 | 一级黄色片武则天 | 激情黄页| 毛片大全在线观看 | 亚洲男人的天堂在线视频 | 欧美毛片 | 精品av在线播放 | 九一免费国产 | 欧美一级一区二区三区 | 91精品国产综合久久久欧美 | 亚洲第一色片 | 手机av在线电影 | 国产亚洲精品久久 | 亚洲一区二区三区在线免费观看 | 国产精品性夜天天视频 | 538任你躁在线精品视频网站 | 日韩大片在线永久观看视频网站免费 | 国产一国产一级毛片视频在线 | 久久影院一区二区三区 | 美女福利视频国产 | 亚洲视频网 | 调教小男生抽打尿孔嗯啊视频 | 久久经典国产视频 | 99精品国产成人一区二区 | 精品一区二区在线视频 | 女人a级毛片 | 国产精品99久久久久久久女警 | 九九爱视频 | 精品国产一区二区三区四区阿崩 | av电影免费播放 | 嗯~啊~用力~高h | 午夜av男人的天堂 | 久久精品a一级国产免视看成人 | 中文字幕爱爱视频 | 国产九九九九 | 九九视频精品在线 |