廣告行銷軟體愛寓交友自動貼文軟體facebook貼版軟體行銷軟體開發租售

Private Sub CommandButton1_Click()

'測試環境

'Adobe Reader X 開檔版本10.1.0.534

'or Adobe Reader 9

Dim tim!

  tim = Timer

  [K1] = ""

  Application.ScreenUpdating = False

  Application.Calculation = xlCalculationManual

  Mypath = ThisWorkbook.Path '讀取目前路徑

  ChDir Mypath

  Myfile = Dir("*.pdf")

  Do While Myfile <> ""

   Set WSh = CreateObject("WScript.Shell")

   WSh.Run Myfile    '開啟 pdf 檔案

   Application.Wait (Now + TimeValue("0:00:1"))

'暫停1(等候開啟檔案看檔案大小電腦執行快慢適度增加)

   SendKeys "%E"   'Alt+E[編輯]

   SendKeys "L"    'L [全選]

   Application.Wait (Now + TimeValue("0:00:1"))

   SendKeys "%E"   'Alt+E[編輯]

   Application.Wait (Now + TimeValue("0:00:1"))

   SendKeys "C"    ' C [複製]

   Application.Wait (Now + TimeValue("0:00:1"))

   SendKeys "%F"   'Alt+F[檔案]

   SendKeys "x"    ' x [離開]

   Application.Wait (Now + TimeValue("0:00:1")) '等候關檔

   Myfile = Dir

   Cells(n * 75 + 1, 1).Select '選取要貼上的儲存格

   ActiveSheet.Paste '貼上

   n = n + 1

  Loop

Range("A1").Select

[K1] = Format((Timer - tim) / 24 / 60 / 60, "hh:mm:ss")

End Sub


來自: http://tw.knowledge.yahoo.com/question/question?qid=1012042005823部落格流量自動點擊流量軟體網路創業廣告行銷軟體規劃網頁設計網路創業廣告行銷軟體規劃
arrow
arrow
    全站熱搜

    李怡伶 發表在 痞客邦 留言(0) 人氣()