Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

Open PDF Files using vba automation

$
0
0

I want to copy the entire content of a pdf document into a word document using vba.I have written some lines of code.It is working but it can't copy the table format present in a pdf file,it is only coping the value present in the table.Below mentioned code has been written by me.Please help me to find out the solutions.

Dim abc As Long

abc = Shell("C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.exe " & "C:\Users\John\Desktop\3120850379.pdf", vbNormalFocus)

 SendKeys "^a"

 SendKeys "^c"

SendKeys "%{F4}"

Set obj = CreateObject("Word.Application")
        obj.Visible = True
        Set book = obj.Documents.Add

        

obj.Activate

        SendKeys ("^v")

excelobj.ActiveDocument.SaveAs "C:\Users\John\Desktop\Test.doc"
        
        
        book.Close
        obj.Quit


Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>