Changing a text field name in an existing PDF via VBA

Using OLE, I am accessing a given form with the following code:
Function GetTextFieldNames(strFormName As String, strFieldName)
Dim myApp As AcroApp
Dim acForm As Acrobat.AcroPDDoc
Dim jso As Object
Dim strTest As String
Dim Field As Object
'Set the object references
Set myApp = CreateObject("AcroExch.App")
Set acForm = CreateObject("AcroExch.PDDoc")
acForm.Open (strFormName)
Set jso = acForm.GetJSObject
Set Field = jso.getField(strFieldName)
'Clean up
acForm.Close
myApp.Exit
Set myApp = Nothing
Set acForm = Nothing
End Function
The two items that I would like to achieve are:
1. Getting a list of fieldnames on the form referenced
2. Changing the field name (in this case, a textbox or checkbox) programmatically.
However, I have not had any success in retrieving a list of available field names, nor have I been able to modify the name of the field. Any ideas?
i.e. It would be nice one could say
For i = 0 to acForm.[FieldCount]
     Set Field = jso.GetField(i)
     Print Field.Name
Next i
...and
Field.Name = "NewFieldName"
I hope that helps to explain what I am trying to accomplish. Any ideas are appreciated. Thank you!

Have you consulted the documentation in the SDK about what methods are available? It will show you how to get the list of fields and/or the proper count for iteration.
IIRC you can't change the name via VBA

Similar Messages

  • Using Javascript to change multiple text field names

    I have a pdf with multiple text fields. I need to change all the text field names (General -> Name) so that they are unique so that when I combine multiple pdfs together, the text fields will stay intact. Is there anyway to do this using javascript? Thanks!

    I'm new to javascript too...it will be very helpfull for me too...Thanks
    poltrone
    prodotti chimici

  • QM03-Custom tab-Change to text field not reflecting-FG - XQQM-screen-0106

    Hi,
    I have a requirement to change the text field on a custom tab of QM03 transaction. Quality notification type is Z1 and the tab is "Checklist". Both are custom defined.
    The existing text field is of 3 lines. The new text message is of 8 lines. When I did the changes on the custom screen 0106 in the function group XQQM, the changes are not reflected on the QM03 transaction's custom tab. Only first 3 lines were reflecting the change and rest of the 5 lines are not appearing on the screen.
    Pointers on this will be definitely helpful.
    Regards,
    Mallika.

    I had a similar problem, but it was with the message line. I found that with Web Forms, I had to issue the Synchronize; a second time, but in Client/Server Forms 6i, the first synchronize worked. Here is the code I used:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> SYNCHRONIZE;
    if Get_Application_Property(User_Interface) = 'WEB' then
    synchronize;--first does not work on web
    end if;</font></pre>
    Let us know if this works.

  • Mass Change of TEXT field

    Hi
    I wanted to carry out Mass change of Text field in 2000 Financial documents, Can anyone give the best way to do the same?
    Thanks

    Hi,
    Execute the FBL3N report by selecting the Documents using Dynamic selection mention
    a) Document no's
    b) Fiscal year
    mention company code and execute the report and use mass change option to make changes.
    The following accounts may not appear in the listing
    a) Recon accounts in case these are not line item managed.
    b) If any of the documents have been archived.
    If you are on ECC6.0 or higher then you can use the report FAGLL03 report this would list the line items in the documents even if the Recon accounts are not line item managed.
    You can also record a SECATT/LSMW to do this for you in case you want different text for each of the line item.
    Regards
    K.R

  • "Find and Replace" for field names in a fillable PDF

    Is it possible to do a "Find and Replace" for the field names in a fillable PDF? For example, I have multiple fields that contain the word "Proposed Insured" as part of the field name and would like to find and replace all of them with "Owner". Is there an easy way to do this?

    Not really. Even a script can't just rename a field. It needs to create a
    new field on top of the old one, but then you lose all the associated
    settings, like validation, calculation, format, keystroke, etc.

  • Merge pdf's forms, change text field name and Acrobat x pro closes automatically

    I merged 20 pdfs in one interactive pdf, but when I try to change the name of the text fields (in orden to make the interactive independent from the other fields) the program close automatically. I tried to change the name of the text fields in each pdf before merge and it's the same problem. what can i do?

    I merged 20 pdfs in one interactive pdf, but when I try to change the name of the text fields (in orden to make the interactive independent from the other fields) the program close automatically. I tried to change the name of the text fields in each pdf before merge and it's the same problem. what can i do?

  • Change input text field color until saved.

    How to change the background color in a text field when edited? When saving the field returns to default. The idea here, not to forget to save before editing another record or exit.
    Example, date and checkbox fields are edible. At the right side, for each row is a link "save".
    (click to enlarge):
    PHP Code:
    http://user-contributions.org/projects/ … er_old.txt

    iphitus wrote:javascript as some sort of 'onkeypress' right?
    Thanks, found a helpful script.
    http://www.webdeveloper.com/forum/print … hp?t=28750
    In my case I copied the shorter sample:
    function ini(a){
    a.style.backgroundColor = '#FFFFFF';
    onclick="ini(this)"
    Sample:
    INPUT TYPE=text size="15" onclick="ini(this)" name="dateApp" value="$myrow[DateApp]
    (click to enlarge):
    PHP Code:
    http://user-contributions.org/projects/ … rowser.txt

  • How to change the text field typestyle in InDesign 6 forms

    I am designing a form in Indesign CS6. I would like to change the typestyle in my text fields. It seems to default to Times Roman. I want to change it to Ariel. Any suggestions on how to do this. I do not want to have to do it in Acrobat.

    You can't do that in InDesign, unfortunately, so you'll have to make changes in Acrobat after exporting to PDF. With scripting you have the opportunity to automate this. Post again if you'd like more info.
    Also, I would strongly advise against using Arial and use the built-in Helvetica instead. Acrobat/Reader actually use a version of Arial when Helvetica is specified. If you specify Arial, it will embed the entire font, resulting in a sigificant and unnecessary increase in file size.

  • Need billing text field name for IDoc mapping

    Hi Friends,
    our users use CRM web application to send orders to SAP via IDocs. They want to have billing text (In German it is called Rechnungstext or Faktura text) so that they can enter some text here if they want to enter something. My question is, what is the field name and IDoc segment for billing text? We need this information to map in XI.
    Br, Sats.

    The solution is:
    The standard Idoc text segment can be used for the text in sales order. From SD side the text types have to be customized. This is necessary for the XI mapping.
    Regards,
    Sats.

  • Fplt-fksaf biling plan text field name?

    Hi Experts
    I have billing plan document status FPLT-FKSAF .
    I want text description of the status fksaf
    I need table field name of this

    Using the following FM u got full details from table FPLT 
    DATA e_fpla LIKE fpla .
    DATA e_fplt LIKE fpltvb OCCURS 0 .
    CALL FUNCTION 'SD_SALES_DOCUMENT_READ'
            EXPORTING
              document_number = doc.
    CALL FUNCTION 'SD_SALES_BILLINGPLAN_READ'
            EXPORTING
              i_vbeln                = doc
              i_posnr                = pos
            IMPORTING
              e_fpla                 = e_fpla
            TABLES
              e_fplt                 = e_fplt
            EXCEPTIONS
              no_billingplan_allowed = 1
              no_billingplan_found   = 2
              OTHERS                 = 3.

  • Changing ALV list field name

    Hi
    In webdynpro application the  ALV list display the field name which is in table description i want to put my preferable field name. Do u all  have any idea how is it possible

    Hello,
    U could bult the fildcatalog like this:
    * Sales Order Number
      CLEAR L_FIELDCAT.
      L_FIELDCAT-TABNAME   = 'G_T_OUTTAB'.
      L_FIELDCAT-FIELDNAME = 'VBELN'.
      L_FIELDCAT-SELTEXT_M = TEXT-002.  " Ur own text
      L_FIELDCAT-COL_POS   = 1.
      L_FIELDCAT-KEY = 'X'.
      APPEND L_FIELDCAT TO IT_FIELDCAT.
      CLEAR  L_FIELDCAT.
    If useful reward.
    Vasanth

  • Bar Code Field changes to Text Field

    Acrobat Pro 8.1.2  Windows 7 Pro
    I have a form with a bar code field.  Once the file is saved and re-opened the Bar Code field changes to a text field.  Any clues why this would happen?

    No special font.  I dont think its an option for the Bar Code field
    Just discovered though that it happens when I use the same field in a page template.  As soon as I create a template with the Bar Code filed and save the file, it changes it to a text field.

  • Change a text field on the timeline from a class

    Hi,
    I need some help in changing the content of text fields that are on the stage of the main timeline from within an external class. I have created a countdown timer which is called from the Document Class. I think it is a problem with the scope of the variable but I can't work it out.
    Main Document Class:
    package
        import flash.display.*;
        import flash.events.*;
        import count_timer;
        import RectangleButton;
        public class main extends MovieClip
            public function main()
              [create a Start Btn]
                var startBtn_mc:MovieClip = new MovieClip  ;
                addChild(startBtn_mc);
                var startBtn:RectangleButton = new RectangleButton("Start",90,25,18,0xCC0000,0x000000);
                startBtn_mc.x = 105;
                startBtn_mc.y = 200;
                startBtn_mc.addChild(startBtn);
                startBtn_mc.addEventListener(MouseEvent.CLICK,onClickStartBtn);
                function onClickStartBtn(event:MouseEvent):void
                    var inputDay1:String = dayInputtxt.text;[these are input fields on the stage]
                    var inputHr1:String = hrInputtxt.text;
                    var inputMin1:String = minInputtxt.text;
                    var inputSec1:String = secInputtxt.text;
                    var counter:count_timer = new count_timer(inputDay1,inputHr1,inputMin1,inputSec1);
    Countdown Timer:
    package
        import flash.display.*;
        import flash.utils.Timer;
        import flash.events.*;
        import flash.text.*;
        import RectangleButton;
        public class count_timer extends MovieClip
    //not sure this is correct
    public var daytxt:TextField;
    public var hrtxt:TextField;
    public var mintxt:TextField;
    public var sectxt:TextField;
            public function count_timer(inputDay1,inputHr1,inputMin1,inputSec1)
                var inputDay = inputDay1;
                var inputHr = inputHr1;
                var inputMin = inputMin1;
                var inputSec = inputSec1;
                var msinputDay:Number = Number(inputDay);
                var msinputHr:Number = Number(inputHr);
                var msinputMin:Number = Number(inputMin);
                var msinputSec:Number = Number(inputSec);
                var ms:Number = Number(msinputDay);
    //convert input to milliseconds
                ms = ms + msinputDay * 24 * 60 * 60 * 1000;
                ms = ms + msinputHr * 60 * 60 * 1000;
                ms = ms + msinputMin * 60 * 1000;
                ms = ms + msinputSec * 1000;
                addEventListener(Event.ENTER_FRAME, loop);
                function loop(e:Event):void
                    ms = ms - 1000;
                    var sec:Number = Math.floor(ms / 1000);
                    var min:Number = Math.floor(sec / 60);
                    var hr:Number = Math.floor(min / 60);
                    var day:Number = Math.floor(hr / 24);
                    sec = sec % 60;
                    min = min % 60;
                    hr = hr % 24;
                    daytxt.text = day.toString();[everything appears to work to these variables. I think it should be root.]
                    hrtxt.text=(hr<10)?"0"+hr.toString():hr.toString();
                    mintxt.text=(min<10)?"0"+min.toString():min.toString();
                    sectxt.text=(sec<10)?"0"+sec.toString():sec.toString();
               if (ms <= 0)
                        removeEventListener(Event.ENTER_FRAME, loop);
                        gotoAndPlay("TimesUp");
    Many thanks in advance.

    Your code is not going to work as you show it. First, you should not be putting your class methods inside the constructors... And yes - scope. You make your new count_timer as a local variable inside a function that is called on click. Essentially, the timer is gone just as fast as it's created. If you want the timer available to the other methods in the class it should be declared as a private var in the class definition.
    And I agree with kokorito - have your timer extend EventDispatcher and then it can do like: dispatchEvent(new Event("myTimerEvent")); and you can then add an eventListener to it when you create it in your main class. You just listen for "myTimerEvent" or whatever string you use, and call whatever function you want - just like using any other listener.

  • Web Service XML Changes Return Table  Field Names

    I am writing a Web service to return a employee information from SAP using .Net Connector. My Webservice XML changes return table column names with few escape characters. Does anyone know why this happens? and How to prevent it?
    Every column name is changed: e.g. PERS_NO to PERS_--5fNO
    NCo -> 2.0
    RFC- > Custom Function module
    RFC Return Type -> ZFPSYNC
    VS.Net -> VS Studio 2003, ( C# Web service)
    Here is part of XML document:
      <?xml version="1.0" encoding="utf-8" ?>
    - <ArrayOfZFPSYNC xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/">
    - <ZFPSYNC>
      <PERS_5fNO>00100001</PERS_5fNO>
      <PDS_5fEMPID>00054740</PDS_5fEMPID>
      <SSN>001380261</SSN>
      <NAME_--5fPFX />
      <FIRST_5fNAME>Tuesday</FIRST_5fNAME>
      <LAST_5fNAME>October</LAST_5fNAME>
      <NAME_--5fSFX />
      <PRIOR_5fNAME>Tuesday October</PRIOR_5fNAME>
      <NICKNAME />
      <CO_5fCODE>TAX</CO_5fCODE>
      <CO_5fCODE_5fT>Tax LLP</CO_5fCODE_5fT>
      <CO_5fCTRY>US</CO_5fCTRY>
      <ORG_5fUNIT>50191687</ORG_5fUNIT>
      <ORG_5fUNIT_5fT>Northeast Region Lead Tax</ORG_5fUNIT_5fT>
      <EE_5fLEVEL>C1</EE_5fLEVEL>
      <EE_5fLEVEL_5fT>Firm Director</EE_5fLEVEL_5fT>
      <SRV_5fAREA>TAX</SRV_5fAREA>
      <SRV_5fAREA_5fT>Tax</SRV_5fAREA_5fT>
      <JOB_5fFAM>CS-TAX</JOB_5fFAM>
      <JOB_5fFAM_5fT>CS - Tax</JOB_5fFAM_5fT>
      <PER_5fAREA>BOSX</PER_5fAREA>
      <PER_5fAREA_5fT>Boston-Berkeley St-TAX</PER_5fAREA_5fT>
      <PER_5fADDR>200 Berkeley Street</PER_5fADDR>

    Please install patch from OSS note 506603. This should correct the problem.

  • Change value of field name while debugging

    Hello,
    i need to debug the user exit . i made the break points .
    the problem that i got is , while executing the t-code kgi2 , i get like 100 records in a table and i have to check for the particular value at number 50 and 70 .
    But when i debug , the debugging starts from number 1 and it takes lot of time to reach to number 50 .
    I wanted to chnage the value of the field while debugging . i tried to click on the pencil on the right and chnage the value but i get the message "no authorization for replace".
    Anybody knows how i can reach to number 50 directly without going to all 49 values .
    please help sap gurus .........
    Sumit
    Edited by: sumit123 on Apr 15, 2010 11:48 AM

    Hi summit,
    In the dubugging
    click on watch point button.. you will gte a poupup
    asking for fieldname  ie : which field value u want to check
    say in your internal table matnr is one of the field and if you have 1000 records and if you want to check for a particular value
    then  given as below
    in the field name =  wa_itab-matnr
               option     =  =  ( euqal )
               value  = 200 ( your rquired value )
    click on ok button
    wtach point will be create now press f8 it will stoed at that particular loop pass ie : when your condition is met.
    Let me know if you need any further info
    Regards
    Satish Boguda

Maybe you are looking for

  • Ipod updates half way then stops

    Hi i have a 20gig click wheel. i am sharing files with a computer in the office in my home. im attempting to update my ipod from my upstairs computer by just having half of my library being feed from the computer in my office ( i have half of my musi

  • How to find out if the stock is available for the sales orders

    hello gurus We have 25 sales orders.. for which we did not have any stock.. so we produced internally and now the stock is available physically and stock is updated in SAP as well. How can i know that for all the 25 orders ..if the stock is now avail

  • Starting exetutable java file from java code

    Hi I was wondering how I can start a executable java file from java code? thanks

  • Simply question: Are these two query same?

    Question 1: There is this query from someone: (I'm not sure how Join ON works) SELECT NULL AS order_id ,line_id ,o.item_id ,o.customer_id INTO v_line_table FROM xx_items_v i, JOIN order_dtl o ON i.item_id = o.item_id WHERE o.que_id = 3380; Is this sa

  • Problem in Getting count

    Hi All, ill be giving a string for my query in the runtime and also ill number the each and every letter in the string according to its position in the string. I need to calculate the count of the letter in the "string". All izz Well GTA