none
How to convert PDF to Text file RRS feed

  • Question

  • Hello Expert,

    Does it possible to convert pdf to text without Acrobat.

    Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
      "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _
        szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
     
    Sub DownloadFilefromWeb()
        Dim strSavePath As String
        Dim URL As String, ext As String
        Dim buf, ret As Long
        URL = ""

        buf = Split(URL, ".")
        ext = buf(UBound(buf))
        strSavePath = ThisWorkbook.Path & "\" & "DownloadedFile." & ext
        ret = URLDownloadToFile(0, URL, strSavePath, 0, 0)
        If ret = 0 Then
            MsgBox "Download has been succeed!"
        Else
            MsgBox "Error"
        End If
    End Sub

    by using above code i am downloaded the file and now want to convert it to text.

    Friday, August 29, 2014 2:24 PM

Answers

  • Hi Munendra Singh,

    As your post it in Office developing forum, I assume that you want to use Office object model to achieve the goal.

    Since Word 2013 has already support editing PDF files, if you are using Office 2013 you can use use Document.SaveAs2 to save the pdf to text.

    If not, as Andreas's suggestion you may need to find a third-party tool or you can get support from Adobe to see whether it supports automation.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 1, 2014 2:46 AM
    Moderator
  • Hi Munendra Singh,

    >>i am using excel vba to open a pdf file and want to contert PDF to text, thats it.<<

    As far as I know, the Excel object model doesn't support to open the PDF files current now. As a workaround, I suggest that you use Word object model if you are using Office 2013. If not, you can consider to find a third-party tool or get support from the vendor of PDF reader.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, September 3, 2014 3:28 AM
    Moderator

All replies

  • Does it possible to convert pdf to text without Acrobat.

    Yes, but you have to use a third-party tool.

    http://lmgtfy.com/?q=pdf+2+text

    Andreas.

    Saturday, August 30, 2014 4:08 PM
  • Hi Munendra Singh,

    As your post it in Office developing forum, I assume that you want to use Office object model to achieve the goal.

    Since Word 2013 has already support editing PDF files, if you are using Office 2013 you can use use Document.SaveAs2 to save the pdf to text.

    If not, as Andreas's suggestion you may need to find a third-party tool or you can get support from Adobe to see whether it supports automation.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 1, 2014 2:46 AM
    Moderator
  • Thanks for response.

    i am using excel vba to open a pdf file and want to contert PDF to text, thats it.

    Monday, September 1, 2014 12:35 PM
  • Hi Munendra Singh,

    >>i am using excel vba to open a pdf file and want to contert PDF to text, thats it.<<

    As far as I know, the Excel object model doesn't support to open the PDF files current now. As a workaround, I suggest that you use Word object model if you are using Office 2013. If not, you can consider to find a third-party tool or get support from the vendor of PDF reader.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, September 3, 2014 3:28 AM
    Moderator