Macro contra Form

Hello all
I just had to convert a program using macros (Define ... end-of-definition). The first thing I do in this case is always to change the macro to a subroutine - in my opinion macros has no advantage over forms, but some major disadvantages.
This make me wonder - why does SAP continue to support macros in ABAP ? - and why does some programmers continue to use macros?
Do macros in abap have any advantages or not ?
Best regards
Thomas Madsen Nielsen

Just to add to all the features of Macros given.
2 more that I feel are quite useful are:
1. You can even pass keywords like SELECT / UPDATE and OPERATORS also as substitutional paramaters. Which in some cases, greatly tends to remove repeating code that differs just in a minor functionality.
2. Macros can also provide variable names in parts, which again in some contexts is very helpful, and used extensively I think primarily in Address Creation BAPI's/FM's
Hence macros can be used to provide both of these in some cases very helpful.
Please follow the following piece of code:
DEFINE m1.
  &4 = &3 &2 &1.
END-OF-DEFINITION.
DEFINE m2.
  op&4 = op&3 &2 op&1.
END-OF-DEFINITION.
DATA: op1 TYPE i VALUE 1,
      op2 TYPE i VALUE 10,
      op3 TYPE i.
m1 op1 + op2 op3.
WRITE op3.
m1 op1 - op2 op3.
WRITE op3.
m2 1 * 2 3.
WRITE op3.
Regards,
Pavan

Similar Messages

  • Word macro from Forms

    How can I start a macro in Word from Forms with the DDE-package? For Excel I use this command ('update' is the macro-name):
    DDE.Execute(ConvID, [run "'test.xls!update"]', 10000);
    Does anybody know the right approach for a Word macro?
    Thanks.
    null

    You should use OLE2 instead of DDE.
    Use this procedure if you're using Word version >= 97:
    PROCEDURE RUN_MACRO(cMacroName VARCHAR2) IS
    objWordApp OLE2.OBJ_TYPE := OLE2.CREATE_OBJ('WORD.APPLICATION');
    objArgList OLE2.LIST_TYPE := OLE2.CREATE_ARGLIST;
    BEGIN
    OLE2.ADD_ARG(objArgList,cMacroName);
    OLE2.INVOKE(objWordApp,'Run',objArgList);
    OLE2.DESTROY_ARGLIST(objArgList);
    OLE2.INVOKE(objWordApp,'QUIT');
    OLE2.RELEASE_OBJ(objWordApp);
    END;
    you can contact me for further explanation.
    Carlos

  • Forms to Excel (OLE2 and macro)

    Hi,
    I am using OLE2 to export data from Forms to Excel. Once I export the data into an excel spreadsheet successfully, I would like to format the worksheet. I have created a macro to do that and try to call the macro from Forms.
    I am getting Ora-305500 and Excel starts but the worksheet doesn't open.
    Is it something to do with the way I created/saved my macro?
    Please help!
    DECLARE
    application ole2.obj_type;
    workbooks ole2.obj_type;
    workbook ole2.obj_type;
    args ole2.list_type;
    BEGIN
    application:=ole2.create_obj('Excel.Application');
    ole2.set_property(application, 'Visible', 'True');
    args:=ole2.create_arglist;
    ole2.add_arg(args, 'C:\excel.xls');
    workbook:= ole2.invoke_obj(workbooks, 'Open',args);
    ole2.destroy_arglist(args);
    args:=ole2.create_arglist;
    ole2.add_arg(args, 'c:\personal.xls!acrt_macro');
    ole2.invoke(application, 'Run', args);
    ole2.destroy_arglist(args);
    --ole2.invoke(application,'Quit');
    ole2.release_obj(workbook);
    ole2.release_obj(workbooks);
    ole2.release_obj(application);
    END;

    Yes, it is possible to read from & write to an excel file.
    you have to use the DDE package to achieve your goal. Read the help content for DDE package, which explains in detail.

  • Hyperion SmartView VB Macro Issue

    I am trying to use smart view "HypMenuVSubmitData" function to submit the data in Webform through Macro. I am using the below Macro
    Private Declare Function HypMenuVSubmitData Lib "HsAddin"() As Long
    Sub MSubmit()
    X=HypMenuVSubmitData()
    End Sub
    I have two sheets
    Sheet2: Webform and the Above macro
    Sheet1: Form Button
    I have assined the Macro to button.
    When I run the Macro from VB editor i.e Pressing the run button, it is submitting the data
    But When I am clicking on the button, It is not submitting the data in the webform. I have tested giving some MsgBox just to chcek if the Macro is running or not. Like
    Private Declare Function HypMenuVSubmitData Lib "HsAddin"() As Long
    Sub MSubmit()
    X=HypMenuVSubmitData()
    MsgBox "Welcome"
    End Sub
    The message getting poped up. But HypMenuVSubmitData is not getting executed.
    Please help.
    Thanks,

    HypMenuVSubmit only submits the active sheet, you may want to try something like below
    Private Declare Function HypMenuVSubmitData Lib "HsAddin"() As Long
    Sub MSubmit()
    Sheets("Sheet2").activate
    X=HypMenuVSubmitData()
    MsgBox "Welcome"
    End Sub
    Regards
    JTF

  • Problem in invoking BPEL Process through JSP

    Hi ,
    I have created a simple BPEL asynchronous process called as " BPELProcessAddMacroTask" .
    JSP File looks like :
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.dispatch.IDeliveryService" %>
    <html>
    <head>
    <title>Invoke AddMacro Task</title>
    </head>
    <body>
    <%
    String EmployeeId = request.getParameter("EmployeeId");
    if (EmployeeId == null)
    %>
    <!-- Construct HTML form here -->
    <h3>Invoke AddMacro Task BPEL Application</h3>
    <h4>Add Macro Task Form</h4>
    <form>
    <table>
    <tr>
    <td>EmployeeId:</td>
    <td><input type="text" name="EmployeeId" value="43"></td>
    </tr>
    <tr>
    <td>TaskName</td>
    <td><input type="text" name="MacroTaskName" value="DIMPLETTE_EXAMPLE"></td>
    </tr>
    <input type="submit" value="Send Input">
    </form>
    <%
    else
    // 1. Get form fields
    //String EmployeeId = request.getParameter("EmployeeId");
    String MacroTaskName = request.getParameter("MacroTaskName");
    // 2. Create loan application XML document
    String xml = "<AddMacroTask xmlns=\"http://xmlns.oracle.com/BPELProcessAddMacroTask\">"
    + "<EmployeeId>" + EmployeeId + "</EmployeeId>"
    + "<MacroTaskName>" + MacroTaskName + "</MacroTaskName>" ;
    // 3. Initiate the BPEL process here
    Locator locator = new Locator("default","bpel");
    IDeliveryService deliveryService = (IDeliveryService)
    locator.lookupService(IDeliveryService.SERVICE_NAME );
    // Construct a normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    nm.addPart("payload", xml);
    // Initiate the BPEL process
    deliveryService.post("BPELProcessAddMacroTask", "initiate", nm);
    %>
    <p>BPEL Process <code>BPELProcessAddMacroTask</code> initiated
    with the input containing EmployeeId=<%= EmployeeId %></p>
    <p>Please refer to the
    BPEL Console
    to see the status of the initiated AddMacroTask BPEL Process.</p>
    <%
    %>
    <body>
    </html>
    I am not finding my " addmacrotask.jsp" in home.jsp even after running "Obant" command .
    I am getting following error when try to invoke the web service :
    My UI Path is : http://localhost:9700/InvokingProcessesUI/addmacrotask.jsp
    I am getting this error :
    Exception Message:
    [java.lang.Exception] Invalid Login. Domain not specified.
    Exception Trace:
    java.lang.Exception: Invalid Login. Domain not specified. at com.collaxa.cube.fe.util.ServletUtils.getLocator(ServletUtils.java:80) at displayInstance.jspService(_displayInstance.java:88) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilter.java:103) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:285) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:126) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534)
    Please someone help me out with this problem .
    Thanks
    Deepika

    Hi ,
    I have set it to this in server.xml :
    <application name="orabpel" path="../../../BC4J/redist/bc4j.ear" auto-start="true" />
    <application name="BPELProcessAddMacroTask" path="D:\BPEL\integration\orabpel\system\appserver\oc4j\j2ee\home\applications\InvokingProcessesUI.ear" parent="orabpel" auto-start="true" />
    </application-server>
    But still not able to create instance . Same problem persists.
    Thanks
    Deepika

  • Very difficult migration from MS Access to Oracle with SQL Developer

    Dear Developers
    I have tried to used for one Project Oracle Sql Developer Migration from Access to Oracle (Application Express). Was about an evaluation if Oracle Express (with Application Express) or Mysql (with PHP) as target database.
    I am working with Oracle for 14 years and i earn my money in projects related with Oracle. Of course i am sentimental and i push every time when an opportunity comes to have as an option Oracle.
    This time beside my sentimental approach the decision was different.
    I will tell you why and i hope that someone there will listen and make something for a better Product.
    I was trying yesterday the whole day to migrate an Microsoft Access database. A nightmare....
    1. Microsoft Access Exporter 2000 was too slow. For a 25 MB Access database, running time was 15 Minutes. And 15 minutes to obtain an undocumented error. I followed your instruction and eliminate all references etc... as you described in HELP. a lot of time necessary to read and do..... After that i obtained an Error #..16. Sorry that i don't provide you with an exact number error. i don't have it right know and personally i am not interested anymore. For this error i don't find nothing in forums about it.... Search again and again..... Every time after waiting 15 Minutes in which you don't know exactly what application does or if really does something. I decided to delete sequentially macros, modules, forms, querys from Access database and see where Exporter stops... Time and time lost for trying and searching.... Finally i obtained my XML file only by keeping my Access tables. The file was produced even if i obtained at the end Error #5:..... Because was an error i am not really sure if the file was completly consistent with my database.
    2. I followed the next steps and with some errors (enabling, disabling constraints, objects couldn't be created because of different reasons) i had my Model and Oracle Schema. I have tried to export the data from Access and import it in Oracle. data exported was in UTF8 and SQL Loader Control file doesn't have
    LOAD DATA
    character set utf8
    So i tried to add the string "character set utf8" in my dozens of CTL files - with a freeware of course.....
    Maybe you can say that if i knew that from the beginning i would have set my character set in SQL Developer. I don't know and i will not ever try with this product!
    So finally after hours of working and trying and playing with my nerves, reading a lot of forums and documentation, i had an Oracle schema, maybe incomplete because of different errors at so much migration stages.
    And now i have tried for the first time in my life MySQL Migration Toolkit. I read that for migration to MYSQL this tool is what i needed.
    I recommend you to try the product and see something about the quality required for a piece of software. Is not enough if your product runs OK with Nortwind DEMO Access database. It should run OK with all ACCESS databases.
    With the tool i have done the job in 5 MINUTES. Simple, efficiently and without errors. At the end i had the SQL Scripts and the DATA imported in the database.
    Difficult to say something now. I am sentimental but i asked mysef if you can do something to improve the quality of the product.
    What arguments can we provide for a client in Migration from Access to Oracle ???? Can you honestly answer at that?
    Please try this MYSQL Migration Toolkit.....Maybe this give you some ideas about simple tasks and about what we really need...
    Best regards
    Adrian

    Dear Barry and Kgronau
    Thank you very much for your response. My Post was after a long day of trying to import an MDB file.
    Maybe you can understand why i was so angry...
    Yes i understand that your tool try to do more than other even if actually you don't really convert too much.
    From Modules to make some procedures where the whole code is commented! .....
    For other MDB which i tried to import in APEX the forms where really not usable. Queries are full of errors requires most of the time manual corrections.
    I am sorry that i can not provide you with this MDB which cause these problems.
    Data and software doesn't belong to me and the company which own it can not provide to you.
    What i hope from your product is, even when errors come, to show a better error explanation. At what object in Access error ocures ? This is very important because i can correct my MDB or just delete the module,form,query in cause if SQL Developer doesn't like it....
    Just showing an error Error #.... doesn't help me too much. And if an error occurs i don't know if program continues to work or is dead. No information about this. Maybe you can show that your application is alive and does something (working status etc...) ! Anyway we wait long minutes in front of dead screen....
    Again, thank you very much for your attention
    Adrian

  • Active X controls in Excel 365 stopped working

    After today's Windows update and re-boot, I am no longer able to drop an Active X control on a sheet or even access existing controls' properties. Underlying VBA code works as do macros and form controls.
    Anybody else seeing this?

    Hi Antene88,
    >>Is there the same problem with office 2013? I still would have to do my updates when I shut down.<<
    Yes, as far as I test the issue occurred in Office 2013 too. Here is a workaround provided by other community:
    First:
    Start Windows Explorer.
    Select your system drive (usually C:)
    Use the Search box to search for *.exd
    Delete all the files it finds.
    Start Excel again.
    Second:
    In this file you can find this line:
    @del "C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Forms\*.exd" /s
    @del "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Forms\*.exd" /s
    @del "C:\Users\%USERNAME%\AppData\Local\Temp\Excel8.0\*.exd" /s
    @del "C:\Users\%USERNAME%\AppData\Local\Temp\VBE\*.exd" /s
     @del "C:\Users\%USERNAME%\AppData\Local\Temp\Word8.0\*.exd" /s
    Also we have reported this problem and will keep you updated once there's any progress.
    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.

  • OLE2 with MS Word -- Table Handling

    Dear All,
    Im using forms 6i.
    Im generating a word document from forms.
    That word document is a template.
    In that template im placing data at runtime..
    My MS Word template has one table with 6 columns and 15 rows...
    But at runtime i may get data more than 15 rows...
    So whenever start printing 16th row im getting non-oracle exception.
    How to overcome this...
    Im writing data into table cells as followin
    procedure SetCellText (DocumentHandle in OLE2.OBJ_TYPE,
                             ThisTable      in PLS_INTEGER,
                             CellColumn     in PLS_INTEGER,
                             CellRow        in PLS_INTEGER,
                             Text           in VARCHAR2) is                   
        hCell  OLE2.OBJ_TYPE;   
        hRange OLE2.OBJ_TYPE; 
        begin
            hCell := GotoCell(DocumentHandle,ThisTable,CellColumn,CellRow);
            hRange := OLE2.GET_OBJ_PROPERTY(hCell,'Range');
            OLE2.SET_PROPERTY(hRange,'Text',Text);
            OLE2.RELEASE_OBJ(hRange);
            OLE2.RELEASE_OBJ(hCell);
        end;    SetCellText(hRange,1,1,v_row,runtimevalue); Is that possible to insert new row at the end of the table ?

    Thanks InoL.....
    Your Hint Macro did the job...
    I created a Macro In the word template to add new row dynamically...
    Then i Run the Macro from my forms as following..
    =============== Created Macro in word template========================
    Sub AddNewRow1()
    Dim oTable As Table
    Dim oCell As Cell
    Dim oPrevRow As Row, oNewRow As Row
    Dim iColumn As Long
    Set oTable = ActiveDocument.Tables(3)
    Set oPrevRow = oTable.Rows(oTable.Rows.Count)
    oTable.Rows.Add
    Set oNewRow = oTable.Rows(oTable.Rows.Count)
    End Sub
    ===========================================================
    ================ Executing Macro from forms==========================
    ARGS := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'AddNewRow');
    OLE2.INVOKE(application,'Run',args);
    OLE2.DESTROY_ARGLIST(ARGS);
    ============================================================

  • SWC_GET_ELEMENT problem in RH_GET_STRUCTURE function

    Hi all,
    i use RH_GET_STRUCTURE function and it don't work fine because i've a problem with macro SWC_GET_ELEMENT.
    My container (table's RH_GET_STRUCTURE function) is :
    ELEMENT  TAB_INDEX  ELEMLENGTH  TYPE  VALUE
    OTYPE      000000      001       C     S
    OBJID      000000      045       C     50006202
    In the code's function there are this line :
    SWC_GET_ELEMENT AC_CONTAINER 'OTYPE' OTYPE.
    SWC_GET_ELEMENT AC_CONTAINER 'OBJID' OBJID.
    For the first line, it's ok, the macro get me 'S' value, but in the second case OBJID is empty, because macro call FORM swc_get_first and the problem occurs on the line 'READ TABLE container WITH KEY swc_cont_key-element BINARY SEARCH.'
    subrc = 4 and i don't know why.
    Thanks for help.
    Regards,

    After more tests, function work fine now, but it's strange...
    I reversed the line into container like that :
    ELEMENT TAB_INDEX ELEMLENGTH TYPE VALUE
    OBJID     000000    045       C    50006202
    OTYPE     000000    001       C    S
    The only difference is that the elements are now classified alphabetically...

  • **URGENT** - PRODUCTION ISSUE with Planning Layout

    Hi,
    we've a manual planning layout that uses both macros SAPAFTERDATAPUT and SAPBEFOREDATAGET with custom code developed in these 2 macros to switch data between "SEM-BPS 1" and "New" sheet.
    Layout has 11 characteristics in lead columns and around 40 keyfigures in data columns (dynamic).
    Using macros, we are formatting SEM-BPS 1 sheet to display all dynamic data coumns in a single page of New sheet.
    for this, our custom macro formats each row of SEM-BPS1 into 10 rows of New sheet by reducing 40 columns into 4 (columns is what matters for our users but not rows).
    We tried this for 40 rows of data. (means, 40 rows 40 columns). Our Custom macro formed 400 rows and 4 columns into New Sheet and even switched data between "SEM-BPS 1" and "New" sheet as per our macro coding. here, we can execute all planning functions. fine till this point
    Now, we have a problem when dealing with 100 rows. (means, 100 rows 40 columns). <b>Our custom macro had formed 1000 rows and 4 columns as expected with accurare data. </b>
    at this point, When we started running any planning function or even when we just click on check button (check button runs both SAP macros, I assume), <b>system is freezing up doing nothing. each time, we had to kill the process. when we looked into CPU usage, we can see that excel.exe process is using 99% of CPU.</b>
    Appreciate if any one can share experinces on this.
    <b><u>Note: </b></u>
    1. By disabling custom macros, we  executed 100 rows 40 columns w/o any issues.
    2. when executed custom macros outside of SAP for 1000 rows 4 columns, both macros took just 2 seconds to switch data between sheets.

    Hi there
    This is the option Jeff was referring to. I see it in my own RoboHelp version 10. As we aren't seeing it in your screen capture, I'm wondering if this was an option that was added via a service release you haven't installed.
    I do suppose another possibility would be that you are using RoboHelp for Word and perhaps that isn't an option with that application.
    Cheers... Rick

  • 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.

  • How do I correctly use Macro Builder to have a form auto select a TAB depending on a value selected in a combo box?

    I am working in access 2013 to update a database first created in Access 2003. It has been saved as an accdb but I have the same problem in earlier versions.
    I have a Tab Control subform in my MainDataEntry form which has 5 different tabs. Each Tab has its own set of text boxes and combo boxes for data entry. At the top of the MainDataEntry form there is a Text box [Text393], which has a drop down with
    the 5 TAB names, [Mobile Device],[Computer],[Loose Media],[Network] and [Original Device]. When I select one of these values in the Text box, I would like to automatically set focus on the first Textbox or ComboBox inside the corresponding TAB.
    I have tried to do this using the MacroBuilder inside the "After Update" Property for the Text or Combo box that is on the MainDataEntry Form using "If" and "Else If" statements for the "GoToControl" action, however
    I seem to be able to only get one Tab to work. I have tried several different variations of this, putting the If statement first and the action argument second...putting all arguments inside a group, or not grouped....nothing seems to work. What am I
    doing wrong?
    EXAMPLE:
    If [Text393]=[Mobile Device] Then
        GoToControl
             Control Name   Combo471
    Else If [Text393]=[Computer] Then
        GoToControl
    Control Name   Bios_Date
    Else If [Text393]=[Loose Media] Then
        GoToControl
             Control Name   Combo659
    Else If [Text393]=[Network] Then
        GoToControl
             Control Name   User Name
    Else If [Text393]=[Original Device] Then
        GoToControl
             Control Name   Combo814
    End If

    In the Macro Builder's AfterUpdate event for [Text393]:
    GoTo Control
      Control Name =Forms!MainDataEntry.Controls(Text393.Value).Name
    To ensure that the first control on each tab receives the focus, set that control's Tab Index property to zero (0).

  • Run macro in PDF form created in LC

    I have created a form in LiveCycle Designer with a text field that can expand to several pages if need be.  It works great.  Now when the person fills it out and emails it back to us, we need to be able to pull all of the comma-delimted text out of the text field and convert it a single column table so it can be pasted into an excel spreadsheet.  I originally did this in word. 
    Is it possible to run a macro like this?  I have a feeling it's not, but you guys are much smarter than me....
    Thanks, Anne

    you will have to add a respective bit of JavaScript code in Acrobat.
    Mylenium

  • VBScript macro in PDF form?

    Hello,
    I have a Word macro (VBScript) that converts an XML file into a reader-friendly text document. I want to integrate this macro into a button inside a fillable PDF form. This would perform the same functions but populate the PDF form fields instead of a Word document.
    Any help would be much appreciated. Thanks!
    RS

    It the person who filled it in probably used Preview, which corrupts PDF forms in a number of ways. To make the data visible in the fields, open the form in Acrobat, export the form data to an FDF file, and import the FDF file that you saved.

  • Use of 'Run macro' in the form field dialog

    Hi Tim,
    Can you please explain the use of the 'Run macro on' on the form field dialog box in the XMLP template.
    One can see the following on the 'Text Form Field Options' dialog box:
    Run macro on
    Entry Exit
    runRTFtoRTF runRTFtoRTF
    runRTFtoXLIFF runRTFtoXLIFF
    runRTFtoXLS runRTFtoXLS
    The above are option values in it. Please explain their usage. I couldnot find anything about it in the XMLP Guide. I am currently using XMLP 5.5 with EBS 11.5.10
    Thanks,
    Nitin

    Form fields are not an XMLP feature. They are part of MS word. Look at the MS doco for information on it. I doubt there is a way that can be used in conjunction with XMLP however.

Maybe you are looking for

  • Copying of Headet note field of purchase requsition to purchase order

    Hi SAP gurus, Can any one please tell how to configure to copy the header note field of purchase requisition to purchase order header. with regards, Amogh

  • INST-6180:Error while retrieving OIM managed Server URL from the domain

    Hi All, 1). Getting the above error when running config.sh from MWHOME/Oracle_IDM1/bin/config.sh 2). I already ran the config.sh from COMMON/bin directory. 3). Extended the domain to support OIM and this ran fine. any suggestions?

  • WHAT is this error 0 = 0 i'm getting??????

    I'm getting this error 0 >=0 when I hit the submit button which points to my servlet code in my servlet public class searchProfileServlet extends HttpServlet     //Variables     private PrintWriter out;     private DBPool ds;     private HttpSession

  • Icloud issues, what's the solution?????? :(

    Has anyone had the problem with their iCloud where u have space on your iPhone and space in the icloud, but yet the books n apps that u download go directly to the icloud oppose to directly to your phone. Than when u attempt to download it from iclou

  • Why does icloud calendar cut off the event window?

    When trying to update an event in iCloud Calendar that's all day long, appearing at the top of my calendar, the dialog box is only visible from the bottom half down. The top half of the event update dialog box gets cut off. I'm using Windows XP, the