How can I click Acrobat Form button from VB (Excel Macro)?

I may be asking in the wrong forum, but I'm at my wit's end and think just about anyone with VB experience would be able to tell me what I'm doing wrong. Is there a forum for interapplication/ VB/ forms questions?
Suffice to say, I know very little about VB (or any of the other languages behind the software), but I've adapted code which has allowed me to get almost everything I need done, thus far.
I'm trying, desperately, to finalize a Macro which enables me to export a lot of Excel info into individual Acrobat Forms and save them all independently. This all works fine, but there is one last thing I've not been able to accomplish: I need to remote click (or 'focus on') a button in the Acrobat form in order to select the icon button (dynamically set image relevant to each individual form, base on excel cell). The button's name, in Acrobat, is 'Photo1' and it is located on the 3rd page of the form. I've several SendKeys commands in order to save each file with a unique, row specific name.
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_NORMAL = 1
Public Const PDF_FILE = "Louisiana_Historic_Resource_Inventory Worksheet.pdf"
Public Sub ClickMe()
    Application.Photo2_Click
End Sub
'this was an attempt to setup a sub which I'd call later...
'all of the below stuff works fine- fills out the form, checks boxes, etc. as necessary
Public Sub Export_Worksheet()
    Dim sFileHeader As String
    Dim sFileFooter As String
    Dim sFileFields As String
    Dim sFileName As String
    Dim sTmp As String
    Dim lngFileNum As Long
    Dim vClient As Variant
    Dim x As Integer
    ' Builds string for contents of FDF file and then writes file to workbook folder.
    On Error GoTo ErrorHandler
    x = 1
    sFileHeader = "%FDF-1.2" & vbCrLf & _
                  "%âãÏÓ" & vbCrLf & _
                  "1 0 obj<</FDF<</F(" & PDF_FILE & ")/Fields 2 0 R>>>>" & vbCrLf & _
                  "endobj" & vbCrLf & _
                  "2 0 obj[" & vbCrLf
    sFileFooter = "]" & vbCrLf & _
                  "endobj" & vbCrLf & _
                  "trailer" & vbCrLf & _
                  "<</Root 1 0 R>>" & vbCrLf & _
                  "%%EO"
    vClient = Range(ActiveSheet.Cells(989, 1), ActiveSheet.Cells(989, 90))
    Do While vClient(x, 1) <> vbNullString
    sFileFields = "<</T(Street Number)/V(---Street_Num---)>>" & vbCrLf & "<</T(Street Direction)/V(---Street_Dir---)>>"
''''''''''''theres a TON of the above correlations, all in the same format
        If vClient(x, 28) = "E" Then
        '     sTmp = Replace(vClient(1, 3), "-", "")
            sFileFields = Replace(sFileFields, "Cond-Excellent", "Yes")
        Else
            sFileFields = Replace(sFileFields, "Cond-Excellent", vbNullString)
        End If
        If vClient(x, 28) = "G" Then
            sFileFields = Replace(sFileFields, "Cond-Good", "Yes")
        Else
            sFileFields = Replace(sFileFields, "Cond-Good", vbNullString)
        End If
''''''''''''theres another TON of the above replacements, all in the same format
        sTmp = sFileHeader & sFileFields & sFileFooter
        ' Write FDF file to disk
        If Len(vClient(x, 1)) Then sFileName = vClient(x, 1) Else sFileName = "FDF_DEMO"
        sFileName = ActiveWorkbook.Path & "\Exports\" & sFileName & ".fdf"
        lngFileNum = FreeFile
        Open sFileName For Output As lngFileNum
        Print #lngFileNum, sTmp
        Close #lngFileNum
        DoEvents
        ' Open FDF file as PDF
        ShellExecute vbNull, "open", sFileName, vbNull, vbNull, SW_NORMAL
        Application.Wait Now + TimeValue("00:00:04")
        'Application.Photo2.Focus
'PDF_FILE.Photo2.Focus
'Application.Photo2_Click
        'Application.SetButtonIcon "Photo1", ActiveWorkbook.Path & "\Exports\" & "vClient(x, 1)" & "-1.pdf", 0
        'Application.Field.SetFocus "Photo1"
        Call ClickMe
''''above is where i'm trying to click the button, although I'd be just as happy if I could 'focus' on the button.
        Application.Wait Now + TimeValue("00:00:02")
        'Application.SendKeys (vClient(x, 1))
        'Application.SendKeys ("-1.pdf")
        'Application.SendKeys ("{ENTER}")
        'SetForegroundWindowap
        Application.SendKeys ("%fap")
        Application.Wait Now + TimeValue("00:00:03")
        Application.SendKeys (vClient(x, 1))
        Application.SendKeys ("{ENTER}")
        'If Len(vClient(x, 1)) Then PrintLine (vClient(x, 1)) ' Else sFileName = "_Check-Parcel"
        ''If Len(vClient(x, 1)) Then SendKeys = Len(vClient(x, 1)) Else sFileName = "_Check-Parcel" {ENTER}
        ''ShellExecute vbNull, "GetSaveFileName", sFileName, vbNull, vbNull, SW_NORMAL & vbCrLf
'        ShellExecute vbNull, "print", sFileName, vbNull, vbNull, SW_NORMAL
        Application.Wait Now + TimeValue("00:00:02")
        Application.SendKeys ("^w")
        'ShellExecute vbNull, "close", sFileName, vbNull, vbNull, SW_NORMAL
        x = x + 1
    Loop
    Exit Sub
ErrorHandler:
    MsgBox "Export_Worksheet Error: " + Str(Err.Number) + " " + Err.Description + " " + Err.Source
End Sub
I'm pretty sure one of many issues is that I don't know the fully-qualified name of the field/button, or how to properly identify it in the Macro.
I have no doubt that my approach, if it's even possible, is clumsy and unfounded, but I am (obviously) flailing around for anything that can achieve clicking this confounded button. Any help appreciated.

It was a button option - I haven't got access to Acrobat 8 here at home, but it was something like
Add menu item
File - attach to email
When the button was clicked, the email application would open with a new email and the PDF would be attached, so you could enter the recipients email address and send.

Similar Messages

  • How can I move Acrobat 9 Pro from my old MacBook to a new one?

    Hi there,
    How can I move Acrobat 9 Pro from my old MacBook to a new one?
    Thanks!

    Hi cialbert,
    Do you have the install media? If not, you can download Acrobat from here: Download Acrobat products | 9, 8 - Adobe.  You'll need your Acrobat serial number (see Find your serial number quickly - Adobe).
    Note, as well, that the licensing agreement allows you to activate the software on up to two computers. If you've already activated it on two computers, deactivate on one before installing on the new computer (see Activation & Deactivation Help).
    I think that should take care of it! Please let us know if you need additional help.
    Best,
    Sara

  • How can I remove the Star Button from the Address Bar?

    How can I remove the Star Button from the Address Bar? There's no obvious way of doing it. Is there any about:config value related to it?

    https://addons.mozilla.org/en-US/firefox/addon/no-star-button/

  • How can I click on a button and make a text box appear or disappear

    How can I click on a button and make a text box appear or disappear?
    Thanks ahead of time for your help,
    Doug

    Hi Denes,
    I just thought that the example you pointed the OP to, is far more complex than what I understood he needs. The OP was talking about using a button, which I thought was a very basic and simple case. Your example is much more complicated. If memory serves, the radio group item, at the time (prior to 3.1 fieldset) behaved differently, so you needed to create a new value retrieving function, and then was the need to preserve the items show/hide status upon reloading the page. In short, I thought maybe I didn’t see the complexity in the OP post, but it seems that his requirement was indeed a simple one.
    Regards,
    Arie.

  • How can I remove Top Sites button from Favorites?

    Hi!
    How can I remove Top Sites button from Favorites bar?
    There is no problem to remove it in previous Safari.
    But I cant find how to remove it in Safari 7.0.

    >>Ok, but they dont have solution.
    Correct - there's not been one found so far, that we've seen here, anyway.

  • How can I stop Acrobat 9 Pro from closing itself?

    I recently installed a trial of the CS4 Master Collection. I already had a copy of Acrobat 8 Standard installed on my computer, during installation it said that my version would be upgraded. However, now, when I open Acrobat 9, after about 10-20 seconds, a window pops up with the title bar as 'Adobe Nameless Application' that asks me to accept the End User License Agreement. If I do so, or click Cancel, this window as well as Acrobat close. If I click Decline, then it takes me to another screen where my only options are Back and Quit.
    How can I stop this from happening, or at least get Acrobat 8 back?

    You can remove the trial, run the CS 4 Cleanscript.
    http://www.adobe.com/support/contact/cs3clean.html
    Run the Microsoft Installer Cleanup tool to remove any vestiges of Acrobat and then re-install Acrobat 8.
    However, before doing that you might try to run the licensing repair tool:
    http://www.adobe.com/support/contact/licensing.html

  • HT2688 How can I "click and drag" songs from one shared library to another?

    I have home sharing activated on my mom's computer and mine and before the newest version of itunes, we were able to click and drag songs from one users' library into the other. We are not able to do that now and I wanted to know if there was a way to do this in the newest version of itunes.

    I am using a Windows computer first off, not sure if that makes a difference,  When you say "click import" where is import.  I can not find anything that says "import" to click.

  • How can I create multiple QR Codes from an Excel File?

    Hi there,
    I am currently trying to set up business cards with a QR Code on the back of each card. Therefore I have an excel spreadsheet, which contains all the data necessary for the business card like name, function, e-mail adress,... the data is then filled in automatically by using the standard function with tags for each column (e.g. table column name is filled in as <<name>> in the specific location on the business card and once executed it is matched with the data from the excel file).
    Is there anything which could help me to automate the personalization of the QR Codes?
    All the best

    For free? Not at the moment. CC does have the ability to create QR codes but only one at a time. In CS6 (perhaps earlier versions?), regular poster/advanced scripter Jongware devised a script to prepare a QR code but again, could only do one at a time.
    However, someone did build on Jongware's QR code to do this from an InDesign file that had the necessary information in tagged text boxes and would prepare QR codes accordingly. However, it would leave them in the InDesign file (e.g. not separate EPS/PDFs).
    So, a long workaround would be:
    install the script and read the thread on the adobe forums (jongware's QR code plus the additional improvement): http://forums.adobe.com/message/4787823#4787823
    data merge the current data into the indesign file using the similar structure as the fourth poster in that post had written
    once all the QR codes are written, create a PDF of the file and then use one of various methods to break up the PDF into single page files: http://colecandoo.wordpress.com/2013/07/13/breaking-up-is-hard-to-do-indesign-files-into-i ndividual-pdfs-that-is/
    It's a lot of work to generate multiple QR codes. A paid solution offered by either Meadows DPS or Woodwing (two companies I have no affiliation with whatsoever) or any other plug-in provider for that matter: http://www.adobe.com/products/indesign/indepth.displayTab3.html may be an alternative that is worth pursuing.

  • How can I do Acrobat separate install from CS3

    Hi, I previously posted in the Acrobat windows forum but realise here would be better.
    I want to install Acrobat from CS3. Remembering past difficulties (couldn't remember exactly what) I thought I'd get instructions before rather than after problems. But eventually thought how hard can it be. Well....
    Story so far - Fresh xp install, installed CS3 choosing only Acrobat, seemed to go fine but won't let me open unless I install other program/s.
    I don''t want them. Have switched to other graphic apps, and am happy with them and don't want the adobe octopus again on my nice clean machine.
    So uninstalled, and instead installed Acrobat 7 standalone till I can sort this.
    Possible option, download Acro9 and use my old serial from when I had the full CS3 loaded? Would this work?  I just feel ripped off at the moment. Using an outdated version, when I have a perfectly good newer one doing nothing, only because I choose my own applications thanks.
    And another thing (raving now) a warning under the so called setup options that this would happen loading Acro alone might have saved a whole lot of time and reboots.
    Any help appreciated.
    Ta

    Thanks so much Bob, (even if I didn't want to hear that!) I would've considered one other, but already, almost immediately I have started having insufficient resource errors. I don't know why. I run very resource heavy apps simultaneously without a hitch normally. Now it happens when I try to open one extra window or copy a few files with nothing else running. Ah, these things were sent to try us.
    Thanks again anyway. 

  • How can I stop the control button from moving the open applications up and exposing the desktop?

    It is getting very annoying when I want to use the control button for other functions.
    I tried looking in settings under keyboard, but found nothing.
    If anybody knows how to change it, I would really appreciate it!
    Thanks,
    Neel.

    Please describe what you are doing and what is happening more fully. I can press the control key all day long and nothing happens.

  • How can i resolve the middle button from spinning?

    My middle button spins but i dont know what the problem is, if i take it to apple will they replace it?

    Hi All,
    We have migrated the forms 6i to forms 10g R2.We are facing push button issue like,the lable is displayed in the button is reduced.Assume the button's label name is Cancel.Actully it is displaying like Can.....Due to Java used in forming the buttons.We have forms count nearly 300.We have diffent size buttons.
    We have solution like
    1.Manually
    2.PC Creation
    3.Java Class and Jar Files
    4.JDAPI
    5.basejini.htm
    The method five,we have tried.But there is no changes after this changes also.
    Can you guys please let us know the correct menthod(with steps 1 by 1) to do this in quickly.
    2.There are look and feel 2 types oracle and generic,rather than this do we have any other type.We are looking for any cusrtomized settings in config files.
    Thanks in Advance.
    Regards,
    GR

  • How can I get Acrobat form cells to autofit text without shrinking font?

    Hi,
    I've been trying to get textfields to auto expand in acrobat 10 without shrinking the font.  In addition, I need all content in the cell to be visable when the form is printed.
    Any easy solutions?
    Thanks
    jdilgy

    So I cant perform 'positioned subforms' or dynamic positioning in Acrobat 10 standard?

  • How can I embed a form on my website and set up a submit button so that when people fill out and click Submit, the filled form will be emailed to me as an attached pdf file?

    How can I embed a form on my website and set up a submit button so that when people fill out and click Submit, the filled form will be emailed to me as an attached pdf file?
    Thank you!

    Hi;
    That is not a workflow that is supported by the Adobe forms solutions at this time.
    Thanks,
    Josh

  • How can i disable a submit button and execute submit_action method on click

    Good Day,
    On my page I have a submit button that execute the submit_action method of the page backing bean that submit data captured on the page into a database and activate another class that send mail at the same time on a click of the submit button,the mail process takes a while before returning back to the page.I was able to disable the submit button to prevent the user from keep click while the process is running but the issue is on clicking the submit button it only disable the submit button without executing the submit_action method of the page backing bean.How can i disable the submit button and execute submit_method of the backing bean at the same time.
    Thanks in advance.

    I tried this out on one of my pages to see if it works.
    First, I added the following JavaScript to my submit button's onClick event:
    this.disabled=true; return true;When I clicked the submit button, it was disabled but the form was not submitted.
    I deleted the JavaScript from the onClick event and added the following JavaScript to the form's onSubmit event:
    var button = document.getElementById("form1:submitButton"); button.disabled=true; return true;When I click the submit button, it was disabled and the form was submitted but the button's action method was not called.
    The next thing I tried was to change the onSubmit event code:
    var button = document.getElementById("form1:submitButton"); setTimeout("button.disabled=true", 500); return true;This seemed to work. The difference was that I added a 1/2 second delay before disabling the button.
    See if that works for you. If not then I'm fresh out of ideas.

  • How can you get your submit buttons to be a single click instead of the default double click?  (The

    How can you get your submit buttons on the quiz template to be a single click instead of the default double click?  (The option to choose double click or not is not showing in properties for this).

    Hmmm... Submit button doesn't need a double click at all. Maybe you are talking about the two-step process? When you click on Submit, the feedback appears with the message to click anywhere or press Y. Is that what you are talking about? If you are talking about a real double-click, something must be wrong in your file. And which version are you using?
    http://blog.lilybiri.com/question-question-slides-in-captivate
    Lilybiri

Maybe you are looking for

  • 865PE Neo2-PFISR problems after power outage

    I need some help with a problem.  A recent power outage while my supposedly "surge protected" 865PE Neo2 based machine was running, apparently messed something up.  After our power came back on, I powered it back up and discovered that I now have 4 o

  • Feature Request: AVCHD Quality to DVD?

    Will Adobe Premiere Elements implement AVCHD quality video to DVD in an upcoming release?  Corel VideoStudio Pro X2 already has this great feature.  Video shot with my Panasonic HD250 camcorder looks fantastic using the AVCHD preset to DVD on VideoSt

  • Problem in running parallel query

    Hi All, We have an Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 installed on Microsoft Windows 2000 Advanced Server 5.0.2195 Service Pack 4 Build 2195. And we have a stored procedure which does lots of works. In this procedure, there is

  • Subtotals

    Hi,   I am trying to build a query which has two characteristics and remaining key figures. I have specified the option never supress result rows for the characteristics. Now when I run the query, it doesnt subtotal for the second characteristic, but

  • LOST Calendar info, running Version 4.1.4 Software Desktop Software

    I lost ALL my calendar info on my Palm software, with the exception of "repeat" events that were logged prior to 2009 (all other repeats enterend this year gone).  Is there ANYTHING I can do retrieve this info?  Unfortunately my handheld has not been