了解我的人都會知道, 本人既懶惰, 又不喜歡做多餘的事, 所以前人已搜集整理的資料, 若無更新或補充, 我就不再多寫一遍了, 除非我認為自己整理得特別有心得。本人也還在學習階段, 所以這裡大概都是一些教學的網址導向, 若已死link, 麻煩告之, 謝謝!
2017年7月1日 星期六
2016年6月10日 星期五
[VBA] A macro for copying the text from pdf to excel with Adobe Reader ONLY
Sub pdf2exl() Dim starDir As String, PDFPath As String, READERPath As String 'Starting path for user selecting pdf files startDir = "C:\testing\" ChDir startDir PDFPath = Application.GetOpenFilename(filefilter:="PDF file (*.pdf), *.pdf") If UCase(PDFPath) = "FALSE" Then Exit Sub End If 'Please change to your own Adobe Reader installation path READERPath = "C:\Program Files (x86)\Adobe\Acrobat Reader\AcroRd32.exe " Shell READERPath & PDFPath, vbNormalFocus: DoEvents Application.Wait Now + TimeValue("00:00:2") SendKeys "^a", True Application.Wait Now + TimeValue("00:00:2") SendKeys "^c" Application.Wait Now + TimeValue("00:00:2") SendKeys "%{F4}", True Application.Wait Now + TimeValue("00:00:2") 'Paste in Sheet1 Worksheets("Sheet1").Activate Sheet1.Cells.Clear Sheet1.Paste Sheet1.Range("A1") End Sub
2016年5月19日 星期四
[VBA] Outlook Auto Email when file is modified
是咁的,小弟要幫公司寫一個program, 當一個folder裡面任意一個file被改動時,就自動send email attach埋個file俾大家。最簡單當然係用現有嘅野,所以選用了VBA + Window API timer. (其實我未寫過VBA...XD)
訂閱:
文章 (Atom)