Trying to run .js script from MS Access

Hello guys,
I am new to programming in JavaScript and Vba.
Okay so I am trying to output data from a few cells from vba into a .js script in order to automatically create bookmarks in pdf files.
This is all going to be part of a big database management system for which has already been created previously.
The database asks the user for inputs which need to be created as bookmarks in pdf files. The inputs will be the page number and the bookmark name.
I am just wondering if it is possible to write code which does this: access the database from your file and populate fields or create bookmarks based on data read from it.
Any help would be greatly appreciated.
Thank you!

You need to use the PDDoc.JSObject from the IAC API. Do you have the
Acrobat SDK? If not, download it - you cannot write code for Acrobat
without having access to the SDK documentation.
As far as the JSObject goes, a while ago I wrote a tutorial about how to
use Javascript from VBA:
http://khkonsulting.com/2009/03/acrobat-javascript-and-vb-walk-into-a-bar/

Similar Messages

  • Exception CX_RS_ERROR occurred when trying to run the DTP from Cube

    Hi everyone,
    I've run the DTP &  loaded the cube using normal transformation routines , it works fine in the Dev Sys but not in quality & production. I've access only to the Dev sys. In Qual & Prod when trying to run the DTP from Cube to open HUB
    we're getting the following error
    Exception CX_RS_ERROR occurred (program: CL_RSTRAN_TRFN================CP, include: CL_RSTRAN_TRFN================CM024*
    My system support package level is SAPKW70106.
    I've found note 920338 but is for SAPKW70107.

    Hi,
    The issue seems to be with the one of the routines in the transformation and similar kind of the issues were solved by retransporting the DTP & the related transformation.
    Kindly reactivate the DTP and transformation in the source and execute a new request to transport the DTP, transformation and related routines to Quality & Production again.
    Hope this helps.
    Rgds,
    Colum

  • HT201177 i'm trying to run a DVD from my mac book pro to a projector.  I can't get a picture and am using the AV cables for mac.  Ideas?

    I'm trying to run a DVD from my macbook pro to a projector.  I am using apple AV connectors and still get no picture.  Ideas?

    What are you getting on the projector?  Does it say 'no input detected'?  Are you getting the spiral galaxy wallpaper?

  • IDCS5-win. Error while running a script from indesign(not via estk)

    Hi all,
    After running the script from indesign, I get following error
    ASSERT '(engine->getDebugFlags() & ScScript::kExtendedErrors) == ScScript::kExtendedErrors' in ..\..\..\source\components\script\javascript\JavaScriptRunner.cpp at line 412 failed.
    ..\..\..\source\components\script\javascript\JavaScriptRunner.cpp (412)
    any idea about this?
    The script runs fine when run from ES tool kit.
    Thanks

    Hi,
    My colleague found the problem. We were using extendables library and we still haven't figured out what was actually happening, but removing it solved the problem.

  • How to run a script from Oracle Form (Beside using HOST command)

    I would like to run a script from Forms 6.0. I know that we can actually issue this command :
    host('plus80.exe' username/password@connect_string @c:\scriptname);
    BUT, is there any other alternative ?

    Sqlplus is a different program, so one way or the other you have to leave Forms to run sqlplus. What is you objection against HOST?
    You can also run sqlplus from the database, but again you need a stored java procedure to call sqlplus (sort of HOST command that runs in the database).
    Francois' solution works if your script just has a query to run, but if you have specific sqlplus commands (spool etc.) forms_ddl is probably not a solution.

  • Running SQLPLUS script from command prompt on SUN

    We are making a migration from VMS to SUN ( SunOS 5.10) and from 9i to 10g. We have encountered an unanticipated problem with running scripts from the command line in SUN(SQLPLUS execution from the command line). All of our packages have a naming convention such as "DM$LOAD.PKB". I know it is a strange naming convention.
    The problem is that when the package creation script is run in SQLPLUS at the command prompt SQLPLUS can not open the file.
    SQL> @dm$load.pb
    SP2-0310: unable to open file "dm$load.pb"
    SQL> host ls
    dm$load.pkb
    SQL>
    Setting the escape character does not seem to help.
    SQL> set escape '\'
    SQL>
    SQL> @dm\$load.pb
    SP2-0310: unable to open file "dm$load.pb"
    SQL>
    Unfortunately, we can not rename the scripts. This can be done from a shell script, but our Tech Services refuse to run the SQL scripts from a shell script
    Any ideas on how to get SQLPLUS to run the scripts from the SUN command line?

    I did not notice that the cut and paste was poor. It should have read
    SQL> @dm$load.pkb
    SP2-0310: unable to open file "dm$load.pkb"
    SQL> host ls
    dm$load.pkb
    Any ideas will be greatly appreciated.

  • Running  sql scripts from different directory

    Hi
    I have sql scripts in different directories as follows:
    D:\myapp\sql
    - load.sql
    - init.sql
    D:\myapp\sql\schema
    -users.sql
    -structure.sql
    D:\myapp\sql\populate\
    - data1.sql
    - data2/sql
    load.sql call all the other scripts as below:
    @init.sql
    @schema\users.sql
    @schema\structure.sql
    @populate\data1.sql
    @populate\data2.sql
    All my scripts run correctly when I run load.sql from D:\myapp\sql on comand prompt.
    I need a way to run this script from a different directory say D:\ or C:\
    I am writing a installer which will execute from a different directory.
    Right now I get a file not found error for scripts within schema an populate folder.
    Please let me know how can I make this work from a different directory.
    Thanks
    kelvin

    Hi peter. i think you cannot run files spread across different locations.
    --the method which u specified always looks to the defined path                                                                                                                                                                                                                                                                                       

  • Error when trying to run web report from BEx analyzer

    Hi Gurus,
    I am getting this error "STOP: System error in program SAPLRRS2 and form SELOPT_ASSIGN-01", when I am trying to run the report from the 4th button "Display report on Web" on BEx Analyzer. Can anybody tell me what this and how we can resolve it.
    Thanks and I will assign points.

    I coudn't properly understand solution provided herein:
    "Solution
    Note that you must generate the query again after you have implemented the correction (Transaction RSRT1 > Generate report).
    SAP NetWeaver 2004s BI
               Import Support Package 07 for SAP NetWeaver 2004s BI (BI Patch 07 or SAPKW70007) into your BI system. The Support Package is available when Note 0872279 "SAPBINews BI 7.0 Support Package 07", which describes this Support Package in more detail, is released for customers.
    In urgent cases, you can use the correction instructions.
    To provide advance information, the note mentioned above may be available before the Support Package is released. In this case, the short text of the note still contains the words "Preliminary version"."

  • Valid sesion for run jython script from a plan

    If I run a cr_clij script i have to do
    app.execStr('udb.login -u user -p password') once and do not produce the login information anymore.
    It is possible to do the same with the sessionID, if I run the script from a plan on the BUI? Or do I have to add the '-s sessionID' option to all clui commands?
    Thanks

    Hi TemPart:
    string cmdArg = “C:\\Scripts\\test.ps1″;
    Runspace runspace = RunspaceFactory.CreateRunspace();
    runspace.Open();
    Pipeline pipeline = runspace.CreatePipeline();
    pipeline.Commands.AddScript(cmdArg);
    Collection [PSObject] results = pipeline.Invoke(); // please Update [] bracket with less then and greater then bracket
    runspace.Close();
    Had to modify this slightly:
    string cmdArg = “Powershell.exe -file C:\\Scripts\\test.ps1″;
    Runspace runspace = RunspaceFactory.CreateRunspace();
    runspace.Open();
    Pipeline pipeline = runspace.CreatePipeline();
    pipeline.Commands.AddScript(cmdArg);
    Collection [PSObject] results = pipeline.Invoke(); // please Update [] bracket with less then and greater then bracket
    runspace.Close();
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

  • Run a script from a script

    Can anyone help me run a script from a script to kill an event listener?
    There is an event listener on save. The same script may be run multiple times before changing workflows (which require different sets of scripts).
    The eventual goal is to have a time stamp in a specific text frame that will already have content. The new stamp will overwrite the old, and only happen before close. Right now it's set for "on save" because I can't figure out an if else statement for "before close". I don't want to have to end the session to be able to work different job types. I need to be able to kill the event listener when exiting documents that create one.
    I'm throwing crap at the wall, hoping it will stick. I'm sure there's a better way to handle it. Anyone have ideas.
    CS3 & CS4 javascript
    Thanks

    Here's the kind of thing I use:
      function runShortRanges() {
        var shortRangesScript = File(getScriptPath().parent.parent + "/IndexExtras/ShortRanges.jsx");
        if (shortRangesScript.exists) {
          app.doScript(shortRangesScript);
    In this case, I want to run a particular script in a known location, only if it exists. It's a way of adding optional functionality to a script.
    Dave

  • When I run my script from a shortcut ExtendScript is invoked, but it is not when I run it the menu

    I am using Photshop CS2 on Win XP
    I have configured a keyboard shortcut (Crtl+Alt+P) to run a .jsx file from the ...\Presets\Scripts\ folder.
    When I activate the script via the Keyboard Shortcut ExtendScript is invoked, and breaks execution on the main() statement (see below).
    When I activate the script via the File/Scripts menu ExtendScript is not invoked and the script runs to completion.
    The .jsx file is a wrapper for a .vbs script which does the 'real' work.
    The .jsx is:-
    function main()
        var VBSscript=File("C:/Program Files/Adobe/Adobe Photoshop CS2/Presets/Scripts/GGN_PS_Code_v1_2.vbs");
        if(VBSscript.exists) VBSscript.execute();
    main();
    Does anyone have any ideas as to how to disable the invokation of ExtendScript when I run the script from the skortcut?

    Thanks Paul.
    I am out of the office at the moment, but your answer rings true. Certainly the .jsx extension is associated with ExtendScript. I'll delete the association and try again when I am back in the office.
    Many thanks

  • Running ISA Scripts from SSL enabled IOP server?

    When attempting to run a script from an SSL enabled IOP server, scripts no longer run.
    Is there a setting to enable the script to utilize the appropriate SSL port?
    Thank you.

    Can you please elaborate some more information on the above post.

  • Running Oracle Scripts from Command Line

    Hi,
    How can i run Oracle scripts from command line.
    Actually i need to run these scripts from MSBuild before running Unit test projects

    C:\>sqlplus @myscript
    That would be the easiest variation
    C:\>sqlplus user/passwd@tns_alias @myscript
    would be an often used variation
    And then there is of course the version with parameter passing:
    C:\>sqlplus user/passwd@tns_alias @myscript param1 ... paramx
    Dunno about MSBuild

  • Running sqlplus scripts from Java code?

    hi
    I need to programmatically run sqlplus scripts from Java code on a machine that doesn't have sqlplus installed.
    Is there any Java class library available for doing this?

    The Ant approach could probably work for me, thanks for the tip.
    The setup seems rather complex however, given the simplicity of the task. I would prefer just running a Java based SQL*Plus from in a separate process or doing this via an API that would allow me to run SQL*Plus scripts (parse script, substitute variables, run statements).
    Oracle SQL Developer v1.1 appears to include an API that does exactly this.
    The ScriptParser, Substitution and SQLPLUS classes in the oracle.dbtools.raptor.scriptrunner package (oracle.sqldeveloper.jar) seem to do just what I need based on my tests.
    Can I use these classes for this purpose in my application? Is repackaging allowed?
    Does Oracle have any plans for releasing this sort of functionality separately e.g. as part of the Instant Client?

  • How can i run unix script from my apex page

    how can i run unix script from my apex page and take the output of unix script as a hidden variable and display it on the report region of that page

    I had a requirement to run a Fortran program against some data that woudl be extracted from the database after the user set up their filtering criteria and made some additional input. SInce the program was to complex to conver to PL/SQL, we decided to try and invoke it from Apex. This is how I did it.
    1. I followed the steps in Tim Archer's excellent article "Oracle External Procedure to Run Host Commands" (http://www.timarcher.com/?q=node/9). If the link does nto work, google the article's title.
    Using this steps I created a function which accepts any OS command, including calling my own shell scripts, and runs them. I called my PL/SQL function "shell" instead of "USF_RUN_HOST_CMD " as Tim did in his example (step 9).
    2. In Apex,
    a. I created a button to run my shell command. (I named it P2_RUN_SHELL)
    b. I created a PL/SQL process whose source looks as follows:
    shell('/home/ackness/scripts/cr_xcf_file.sh > /tmp/cr_scfp_file.log');
    and which was conditioned on the the button P2_RUN_SHELL.
    It works like a charm.
    Note: since you can run your own scripts using this method, you can encapsulate a series of commands in a UNIX shell script and invoke that script from Apex. This allows you to be able to test or run you commands from the command line as well as Apex and makes it easier to develop/debug/enhance the scripts in the future.
    Ackness

Maybe you are looking for