Read PDF form from email attachment

Hope someone is able to help on this one...
We are using a pdf form at work to gather some feedback and the user will be submitting the form via email...
Using outlook 2003 I had a crack at writing a vba module to read the pdf form from the email attachment to update into an excel spreadsheet
Is it possible to read pdf forms from the email attachment with outlook vba? Or does the attachment need to be saved to a directory first?
I have in the past done a vba module to save the pdf form attachments to a directory and then using acrobat and it's in-built form data collection tool and exported as a csv, but this feedback form will be an ongoing thing that will be updated daily - and to minimise handling would like to run the outllook macro that reads straight from the email attachment instead of doing another 3 or so steps...
Below is the snippet I am using - it's a mashup of different code I've found on the net
Sub Feedback()
    On Error GoTo Feedback_err
    'Dim ns As NameSpace
    Dim objNS As NameSpace
    'Dim Inbox As MAPIFolder
    Dim objFolder As Outlook.MAPIFolder
    'Dim SubFolder As MAPIFolder
    Dim objExcel
    Dim oBook
    Dim oSheet
    Dim gApp As Acrobat.CAcroApp ' In Tools > References > Checked all Acrobat Libraries in VBA > Tools > References
    Dim pdDoc As Acrobat.CAcroPDDoc
    Dim jso As Object
    Dim Item As Object
    Dim Atmt As Attachment
    Dim filename As String
    'Dim i As Integer
    Dim myOrt As String ' Added 13/1/2010
    Set objApp = CreateObject("Outlook.Application")
    Set objNS = objApp.GetNamespace("MAPI")
    Set objFolder = objNS.PickFolder
' Check subfolder for messages and exit of none found
    If objFolder.Items.Count = 0 Then
    'If SubFolder.Items.Count = 0 Then
        MsgBox "There is no Feedback emails in this folder.", vbInformation, _
               "Nothing Found"
        Exit Sub
    End If
' Check each message for attachments
    Set objExcel = CreateObject("Excel.Application")
    Set oBook = objExcel.Workbooks.Open("G:\Path\Filename.xls")
    Set oSheet = objExcel.Worksheets(1)
    oSheet.Range("A2").Select
    Set gApp = CreateObject("AcroExch.App") ' make acrobat session
    Set pdDoc = CreateObject("AcroExch.PDDoc")
    Set jso = pdDoc.GetJSObject ' set the Javascript object via this way we can fill in the PDF document fields
    For Each Item In objFolder.Items
        For Each Atmt In Item.Attachments
            If Right(Atmt.filename, 3) = "pdf" Then
                Do
                If IsEmpty(objExcel.ActiveCell) = False Then
                    objExcel.ActiveCell.Offset(1, 0).Select
                End If
                Loop Until IsEmpty(objExcel.ActiveCell) = True
                    objExcel.ActiveCell.value = jso.getField("CurrentDocDate").value
                    objExcel.ActiveCell.Offset(0, 1).value = Item.Session.CurrentUser
                    objExcel.ActiveCell.Offset(0, 2).value = jso.getField("txtJobNo").value
                    objExcel.ActiveCell.Offset(0, 3).value = jso.getField("rbStatus").value
                    objExcel.ActiveCell.Offset(0, 4).value = jso.getField("rbFeedback").value
                    objExcel.ActiveCell.Offset(0, 5).value = jso.getField("txtComments").value
            End If
        Next Atmt
    Next Item
    oBook.Save
    objExcel.Quit
Feedback_exit:
    Set Atmt = Nothing
    Set Item = Nothing
    Set objNS = Nothing
    Set pdDoc = Nothing
    Set objExcel = Nothing
    Set jso = Nothing
    Exit Sub
' Handle Errors
Feedback_err:
    MsgBox "An unexpected error has occurred." _
        & vbCrLf & "Please note and report the following information." _
        & vbCrLf & "Macro Name: Feedback" _
        & vbCrLf & "Error Number: " & Err.Number _
        & vbCrLf & "Error Description: " & Err.Description _
        , vbCritical, "Error!"
Resume Feedback_exit
End Sub
I get a vba error 91 "Object Variable or With  block variable not set"
Cheers
Ben

hi Phani,
with regard to your problem I would suggest you to please go thru this link.
Hope this would be helpful to you.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/offline%20interactive%20pdf%20form%20using%20e-mail.pdf
Thanks,
kris

Similar Messages

  • PDF form as email attachment for purchase order

    Hello All,
    I need send to send the PDF based form as an email attachemnt when ever a new PO is created, I have already created a form thru SFP tcode and set the message type for PO and getting the PDF based form as output in the preview.
    Could any one suggest me where to put the code to send the generated PDF as a mail when I set the message output type medium to 'External send'  for the purchase order.
    Regards,
    Phani

    hi Phani,
    with regard to your problem I would suggest you to please go thru this link.
    Hope this would be helpful to you.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/offline%20interactive%20pdf%20form%20using%20e-mail.pdf
    Thanks,
    kris

  • I need to add an attachment to a pdf form from the SBA it is OIC_TABS_NGPC_nl.pdf

    I need to add an attachment to a pdf form from the SBA it is OIC_TABS_NGPC_nl.pdf

    Do the people who made the form SAY you can add an attachment? If not, do not consider it. The form will probably be read by a computer, so it will only look in the form fields provided.

  • Starting yesterday I can scan a pdf file in from the scanner and can not send a pdf in an email attachment

    Starting yesterday I can scan a pdf file in from the scanner and can not send a pdf in an email attachment.  What happened?  Windows 8

    Adobe Reader can't scan documents. What software do you use?

  • How to email PDF form as an attachment?

    Hi All,
    I have developed online interactive form app(dynamic).
    When user clicks the submit button after entered the data,
    I want to email the PDF form as an attachment to some users.
    Could anyone please explain the steps or give me some sample code?
    Thanks
    Sundar

    I found this in one of the forums dont remember which, here is the code
      public boolean EmailForm( java.lang.String pernr, java.lang.String toEmail, java.lang.String fromEmail )
        //@@begin EmailForm()
    boolean flag = true;
       try {
        String host = "exchangerelay.yourserver.com";
        //    Get system properties
        Properties props = System.getProperties();
        //    Setup mail server
        props.put("mail.smtp.host", host);
        //    Get session
        Session session = Session.getDefaultInstance (props, null);
        //    Define message
        MimeMessage message = new MimeMessage(session);
        byte[] b = wdContext.currentContextElement().getPdfSource();  
       //Attachment
        ByteArrayInputStream ba = new ByteArrayInputStream(b);
        String filename ="Filename.pdf";
        //This will create a file on the server under folder "server0"
       File file = new File(filename);  
        FileOutputStream fos = new FileOutputStream(file);
        int i = 0;
        for (i = 0; i < b.length; i++) {
         fos.write(b<i>);
        fos.close();  
        DataSource source = new FileDataSource(file);
        BodyPart messageBodyPart = new MimeBodyPart();
        message.setFrom(new InternetAddress(fromEmail));
        message.addRecipient(
         Message.RecipientType.TO,
         new InternetAddress(toEmail));
        message.setSubject ("Subject : ");
        message.setText(
         "This is a confirmation receipt.");
        Multipart multipart = new MimeMultipart();
        messageBodyPart.setDataHandler(new DataHandler(source));
        messageBodyPart.setHeader("Content-Type", "application/pdf");
        messageBodyPart.setFileName(filename);
        multipart.addBodyPart(messageBodyPart);
        message.setContent(multipart);
        Transport transport = session.getTransport("smtp");
        transport.connect(host, "username", "password");
        transport.sendMessage(message, message.getAllRecipients());
        transport.close();  
        flag = true;
        //delete file if you want to here
        file.delete();
       } catch (FileNotFoundException e) {
        flag = false;
        wdComponentAPI.getMessageManager().reportException(
         "FileNotFoundException : " + e.getMessage(),
         false);
       } catch (IOException e) {
        flag = false;
        wdComponentAPI.getMessageManager ().reportException(
         "IOException : " + e.getMessage(),
         false);
       } catch (MessagingException e) {
        flag = false;
        wdComponentAPI.getMessageManager().reportException(
         "MessagingException : " + e.getMessage(),
         false);
       return flag;
        //@@end
    thanks,
    Sanketh

  • Fillable PDF Forms From Read Only PDF

    Hello,
    I am using Pro to create Fillable Pdf Forms From Read Only Pdf, I have produced a document of sorts but am a bit concerned that I could not create vertical fillable boxes and want more information on the colour of the fillable boxes. Any guidance would be very welcome, am going the right route on this, should I be using something on the acrobat site.  Thanks for considering this.

    Hi,
    I m also facing this kind of problem but know I m using Classic PDF Editor. Its working fine with me. Classic PDF Editor is one of the best and cheap PDF software which can create, view and edit any PDF file. You may try free trial version of Classic PDF Editor with functionality visit ClassicPDF.com
    Hope this software solves your problem. After using Classic PDF, don't forget to come back and share your views about this software.
    Thanks

  • Send PDF form to email address user enters in textfield on form.

    I would like to be able to allow the person using the form to choose what email address the PDF form is emailed to. I read this post which sounds like what I want but I keep getting a Submit Cancelled error. The email does get generated and the form is attached as a PDF so that part works okay.
    http://forums.adobe.com/message/4167414#4167414
    This is the code I am using as I only need the To: address populated.
    form1.Page1.Button1::preSubmit:form - (JavaScript, client)
    var strToAddress
    //Capture the values from the form fields.
    strToAddress = txtToAddress.rawValue;
    event.target.submitForm({cURL:"mailto:"+ strToAddress,cSubmitAs:"PDF",cCharset:"utf-8"});

    Hi,
    There is an example here: http://assure.ly/eUR4wJ.
    // Declare the variable
    var vEmail;
    // Check that the email field is not null
    if (txtToAddress.rawValue !== null) {
         vEmail = txtToAddress.rawValue;
    // Send email
    event.target.submitForm({cURL:"mailto: " + vEmail + "?subject=&body=",cSubmitAs:"PDF",cCharset:"utf-8"});
    Niall

  • How to send generated form in PDF form through email

    hi,
    i am working on interactive form in Webdynpro Java, when i am trying to send pdf form as an attachment. i kept Email Submit button in the form and when i am clickink on send email button it is taking local outlook user in default and attachment as .XML attachment. i want attachment as .PDF form.
    can any body please help.
    thanks,
    kishore.

    hi,
    Read the following blog it is explaining nicely about this scenario.
    Sending mail with an online interactive form(pdf) as an attachment.
    Thanks and Regards
    shanto aloor

  • PDFMaker missing files issue with PDF Forms from Office 2007

    Hi,
    I have Adobe PDF 8.0 Pro installed  (full installation) and I upgraded office from 2003 to 2007 AND Windows from 2000 to XP Pro.
    I used to be able to create PDF Forms from an Excel document when using Office 2003.
    Now, when I choose to create a new form starting with an electronic document [from an Excel 2003 document (.xls)], I get this error message:
    "PDFMaker files are missing, would you like to repair?" (please image attached)
    I did the repair. Did not worked.
    I made sure the add-in in office was enabled. Did not worked.
    I un-installed Adobe 8.0 Pro and Adobe Reader 9.0 and re-installed only Adobe 8.0 Pro , thinking there was a problem there. Did not work.
    I googled for more answers, did not find anything else.
    I am able to "print as Adobe PDF", I can create normal PDF documents, but not the Forms.
    I used that option all the time for work. Can someone help me please?!!
    Thanks!
    Gwen

    Bill, it worked!!
    I updated to 8.1.6 and now I can use an electronic document to create a form.
    Thank you!
    I have another question: in the past, to enable Acrobat READER users to fill out a form and save it on their computer, all I had to do is "Enable Usage Rights in Adobe Reader" in the "advanced" menu of Acrobat Pro.
    I did just that but my colleagues who have Adobe Reader 9 cannot fill the form. It appears as a scanned PDF document to them.
    Any idea why?!
    Gwen

  • Extract interactive form from workflow attachment

    I have a multi-step approval process where you want to store the data in
    the
    backend only after final approval. (requestor >> expert >> approver)
    I developed a WDJ app with Interactive forms that triggers Business
    Workflow...
    I created a Webdynpro Java application which contains an interactive form
    for the Requestor.
    The Requestor fills out the form, and submits. The submission action
    triggers a simple workflow and adds the interactive form as an attachment
    to
    the workitem. (Using SAP_WAPI_START_WORKFLOW and
    SAP_WAPI_ATTACHMENT_ADD)
    The new task shows up in UWL with the attached pdf form.
    When the approver clicks on the task in UWL it will launch a web dynpro
    application which will display the interactive form.
    How do I extract the interactive pdf form from workflow?
    I want to display the form in my Web dynpro java application and bind
    it to the pdfSource context??

    Can we know the reason why do you need to extract the Interactive Form from Workflow.When you are calling the workflow try to save the form in a shared folder and save the url of the shared folder in a field and try to acces it by using SAP Activity.You can create a button for that create an SAP activity and when you click on the button the Interactive Form can be opened.
    Iam not sure weather i have answered your question or not?

  • I am working in Adobe Acrobat 9 Pro and just created a pdf form from a MS Word document. I need to find out how to have a date field in my form which will update automatically. Can some one out there help me?

    I am working in Adobe Acrobat 9 Pro and just created a pdf form from a MS Word document. I need to find out how to have a date field in my form which will update automatically.

    Update automatically under which circumstances, exactly?

  • Creating a PDF form from a docx or xlsx

    Hello,
    Pulling my hair out over here... Can you help me out?
    I am trying to create a PDF form from either a word or an excel file.
    When I choose File > Create > PDF Form, I get the dialouge box asking to use either a file or scan from paper. Choosing file, then hitting next shows the choice of current document or browse for file. I browse for file, find my docx file, but it shaded out. Docx or xlsx does not appear in the "show" drop down below, which suggests that this function doesn't support these formats. HUH?
    I have read & watched the tutorials linked below, both of which clearly say Word and Excel are supported.
    http://help.adobe.com/en_US/acrobat/pro/using/WSB3F26303-0F1D-494a-BC55-7BF7F6684B4D.html
    http://tv.adobe.com/watch/learn-acrobat-x/getting-started-creating-simple-forms/
    Then I noticed a difference in the create window from the video, to my version...
    The video says "(PDF, Word, Excel or other file format)":
    My pop-up says ONLY PDF:
    Whats going on?
    I am using:
    MAC OSX 10.7.4
    Office 2011 MAC
    Acrobat X Pro 10.1.3
    Only way I can create a Form from Word files is to first print it to PDF, then use the form wizard on the PDF file... Which seems to have POOR results in auto-recognizing fields.
    PLEASE HELP Adobe!
    Thanks.

    I just got Acrobat X for my mac, for a class.  I am SO frustrated.  Almost everything in the class focuses on PDFMaker options.   The 'save as adobe pdf' or save as pdf options have zero functionality.  So I now own PDF software that doesn't really function on a MAC, and have to go to a windows machine.  I keep reading that it is a Microsoft problem, but I don't know how that can be when the software I thought I bought is this fancy PDF software that converts everything!!
    I asked a tech today if there were 'any' adobe work-arounds for this and basically the answer is to save PDF with no attribute functionality.  Period.
    Wasted $$ for me

  • I created a pdf form from a Word doc with 9 pt aerial font formatting; the text on the pdf form is aerial 9 pt, but the fields are formatted in courier 12 pt - How do I reformat the font in the fields??

    I created a pdf form from a Word doc with 9 pt aerial font formatting; the text on the pdf form is aerial 9 pt, but the fields are formatted in courier 12 pt - How do I reformat the font in the fields??

    You can set up a temporary button (or link, bookmark, etc.) and add the following JavaScript action:
    // Mouse Up script for a temporary button (or bookmark, etc.)
    // Change the font and font size for all text fields in this document
    for (var i = 0; i < numFields; i += 1) {
        var f = getField(getNthFieldName(i));
        if (f.type === "text") {
            f.textFont = font.Helv;
            f.textSize = 9;
    It also sets the font size, but you can remove that line if you don't need to do that.

  • HT2506 I am trying to fill out a PDF form from an internet site, but when I go to print it, none of the content prints, only the header of the document.  Help!

    I am trying to fill out a PDF form from an internet site, but when I go to print it, none of the content prints, only the header of the document.  Help!

    Instead of printing it, try saving it as a pdf from the print menu, and then printing the pdf out.

  • When I try to open a PDF form from a site, my screen goes black.

    When I try to open a fillable PDF form from any web site my screen goes black and nothing further happens. I can use IE with success, but would prefer Firefox.

    You're welcome.
    Could you please click the "''Solved It''" button next to the post which solved the problem for you? This will help others searching for a solution to the same question.
    Thanks.

Maybe you are looking for

  • Is it possible in Aperture 3 to sort by camera serial number..?

    Ok so I've bought a second 5Dmk2 for my Wedding photography, now the time sync is out by 1 hour on each camera, summer time and none summer time.. I know how to change this in the meta data, but my problem has a bit more to it, the file numbers also

  • Nokia N70 does not synchronize my outlook once off...

    My Nokia N70 does not synchronize my outlook once off appointments but only reoccurring ones with Windows 7 as operating system & MS Office 2007 using PC Suite version 7.1.40.1 Why it was working before with older PC Suites?

  • Interlligent agent problem ,when start it.

    when i start interlligent agent ,it is report that ????.lib has bad magic. how do make deal it. thank in advance

  • Strange Mail/Gmail trash behavior - syncing trash

    I'm using Apple Mail (2.1.3) with Gmail (IMAP) with my Mailbox Behaviors set: Store drafts on server (checked) Store sent (unchecked) Store junk (checked) Move deleted messages to Trash (checked) Store deleted messages on server (unchecked). I'd like

  • IPhone v.2 anytime soon?

    Hey everyone, I'm looking to purchase an iPhone sometime soon. I was wondering if anything has been announced or is there any speculation as to when a newer version of the iPhone will be coming out? Any ideas as to the features/specs it may include?