How to assign a macro to a command button in 2007

I apologize, I know this is on the web somewhere, but I've spent the last 2 1/2 hours fishing for answers on Google and forums and everything I find either assigns a macro command to the quick bar or in text, but I want to assign it to a command button,
or anything that can be clicked to run a macro.  In Excel I can just right click on a macro button and use the option "Assign Macro", but I've not been able to find anything similar in Word.  I'd think being another Office product it would
be a similar option in Word, but I guess not. 
So my project is taking information from Excel via linked information to fill out a Word document, so I need to use CTRL-A to select all text, then hit F9 to update the fields, then print as a PDF and send to the customer, and it works beautifully. 
Now I need to share this with my team and I'm trying to make it as foolproof as possible so I was going to do all of this via macro and assign it to a macro button, or I guess it would be a Command Button in Word? 
I also don't want the command button to show when I print the document.  Is all of this fairly simple to do in Word?
Thank you in advance for your help!!!

Hi Arun ,
Thanks for the reply,
This is the actual scenario,
I need to allow user to querying using a particular atrribute say A1 but applying A1 directly as a criteria on my base query along with other criteria will not fetch any details.
Instead
I need to fire the same query with A1 alone initially and on top of the fetched results i need to apply the other criteria
OR
I need to get the A1 from user and fetch some other attribute let's say A2 corresponding to A1 and this A2 has to applied as the new attribute along with the other attributes.
Can this be achieved.
Regards
Siva
I am using jdev 11.1.1.6

Similar Messages

  • How to assign the enter pressing to the button click event of swing button?

    Hello to all you pro's,
    I can't find how to make my button a default button so it will respond to an enter press.
    any help will be most appreciated.
    thanks in advanced.

    get the RootPane and call setDefaultButton on it. Something like so:
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    class SwingFu2 extends JPanel
        private JButton buttonOK = new JButton("OK");
        private JButton buttonCancel = new JButton("Cancel");
        private JTextField textfield = new JTextField(12);
        private JFrame frame;
        SwingFu2(JFrame frame)
            this.frame = frame;
            ActionListener buttonActionListener = new ButtonActionListener();
            buttonOK.addActionListener(buttonActionListener);
            buttonCancel.addActionListener(buttonActionListener);
            add(textfield);
            add(buttonOK);
            add(buttonCancel);
            frame.getRootPane().setDefaultButton(buttonOK);
        private class ButtonActionListener implements ActionListener
            @Override
            public void actionPerformed(ActionEvent e)
                String command = e.getActionCommand();
                if (command.equalsIgnoreCase("OK"))
                    System.out.println("OK pressed");
                    System.out.print("Text in textfield: ");
                    System.out.println(textfield.getText());
                else if (command.equalsIgnoreCase("Cancel"))
                    frame.dispose();
        private static void createAndShowUI()
            JFrame frame = new JFrame("SwingFu1");
            frame.getContentPane().add(new SwingFu2(frame));
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public static void main(String[] args)
            java.awt.EventQueue.invokeLater(new Runnable()
                public void run()
                    createAndShowUI();
    }

  • How to specify the target for a command button action?

    Hi can anybody explain how to achieve the target feature, i mean i need to display the result of the action in a different window after clicking on the button. Is there anyway to achieve this?
    I want to click the button using Javascript.(using button.click event).
    Thanks in advance

    Thanks for the reply Stas, but it is not the solution I wanted. I want display the result of that action into a different frame of the window. As we have target attribute of the anchor tag in HTML. The target attribute of the h:CommandLink is not working. I tried that.
    Anyway thanks again.

  • Command buttons best practice

    Hello,
    I would like to ask how others design their GUI with several command buttons (OK button Boolean).
    For instance, there is a simple application where the user can start data acquisition by clicking on a button with text "Start monitoring". Instead of having another button with text "Stop monitoring", usually I just change the button label text into "Stop monitoring", so it is obvious to the user that again clicking on it will stop the monitoring process of the app (in the event case of this button I read out the actual label text with property node in order to decide which action to message to the DAQ loop from the GUI Event handler loop).
    If I have another button with label text like "Start file record", I do the same way: after starting file record, I change the text to "Stop file record".
    To avoid unnecessary extra programming, this button is only in Enabled state if the application is already in the "monitoring" state. Also, if there is an ongoing file record (+ DAQ obviously), the user cannot operate the "Stop monitoring" button. So depending on the state of the applications, some buttons are Enabled, some in "Disabled and grayed out" state.
    I wonder how others are doing their GUI/application?
    I am not sure if this is a good way to do, but at least I can avoid extra state check programming and minimizing the number of buttons...
    Solved!
    Go to Solution.

    Also booleans can have three different images associated with them (well more for things like mouse over but that's not what  I mean).  You can have an image that is shown when the button it True, when the button is False, or an image that is shown when it is either False or True.  So on top of having the text show "Start" or "Stop" I usally replace the True image and the False image with a start and stop icon.  Customize the boolean control, and then right click and choose Import Picture From Clipboard and select the appropriate state.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How to assign the default service package to the user in the command line ?

    when i create use use the following command ,which service package is assigned to the user ,or in where can i set the default service package ,thanks for you!
    /opt/SUNWcomm/bin/commadmin user create -D admin -F John -l jdoe -L Doe -n jnpc.com.cn -p 80 -w admin123 -W demo -X v120e.jnpc.com.cn -S mail,cal -E [email protected] -H v120e.jnpc.com.cn -k legacy

    When I create a user via command-line, I get no service package. I don't see any way to assign such on creation via command-line.
    Some of what might be in a service package can be set as default falues, through configutil.
    quota is this kind of thing.

  • How to call excel macros in ODI

    Hi gurus,
    I am new In ODI please help me with this. i want to store sheet name of excel file in a variable.I have written a macro function for this please help me how to call that macro function in ODI
    Thanks & regards

    this are my thoughts ,since you will have to deal with multiple files and read multiple sheets . While dealing with Excel ,we have to deal with DSN and so multiple Excel can a be a little complex.
    I think we can make use of your macro function by calling via VB and once you find the correct value write a in separate txt File. Now this File can be called in ODI and read and processed as you wish to .
    Step 1. Call your Macro Function via VB
    Step 2. Call this VB program via OS Command, which write to a separate file.
    Step 3. Call this variable and read from the file via this methods http://odiexperts.com/?p=243 , http://odiexperts.com/?p=273.
    Does this helps you .

  • How to Setup an ACL over a Command in solaris 2.6

    Hi all,
    Has anyone have an idea on how to setup an ACL over a command
    in solaris 2.6 . i.e: to force a user (or a group) to enter a
    password to run a command (like mount and others).
    Thanks for your help.
    haed98.
    [email protected]

    Hi head98,
    You can set ACL using setfacl commands. This way you can exclusively assign read/write/execute permissions on command that you wish. But ACL doesn't prompt for passwords or you can set passwords using ACL. One way of doing this will be to create wrapper for commands which will prompt for passwd, compare them with /etc/shadow and then execute the real command.
    Hope this helps, Thanks. SUN/DTS

  • How to assign own Process code to a function module

    Hi,
      In we42.
      How to assign own Process code to a inbound idoc
    function module?
      Here function module name is not coming in the list.
    Ansar.

    Hi,
    USe transactn: WE42, define ur process code, double click and assign func module...
    To know all the transactions for ALE IDOC.. use
    WEDI.. Goto SAP easy screen there just type WEDI in command box and enter.
    Plz mark if useful..
    Regards
    Divaakr

  • How to assign MMC with an AKAI MPD-24

    Hi,
    I got a problem.
    I assigned each potentiometer of my MPD-24 very easily in Logic.
    But I don't know how to assign the MMC commands (Play, stop, rec...).
    I tried the same way I did for the potentiometers but it does not work !
    Have you got any idea about that ?
    Thanks

    Cool un français.... je vais pouvoir expliquer plus clairement.
    en haut à gauche de Logic, tu as un menu "Préférences" et un "réglages" C'est dans un de ces deux-là... mais je pense que c'est dans "préférences puis "midi" (ou bien réglages" "surface de controle" (désolé je suis pas devant là je peux pas vérifier).
    A un endroit il y a une case à cocher "apprendre MMC"... tu coches.
    Ensuite, en bas de la fenêtre principale de logic, à coté du métronome tu as un bouton "synchro" avec un S dessus. Tu cliques... tes pistes s'allume en jaune... et là normalement ça marche !!

  • [b]how to assign whole expression to a temporary variable[/b][/b]

    Good afternun. Can someone help me how to assign the whole expression to a temporary variable. The expression is
    id = catDao.findByPK(info.getCategoryId());
    Thanks in advance and may I know how to validate the temporary variable?

    You can do this with an anonymous class and a command pattern.
    interface LazyEval {
       public Object getValue();
    LazyEval le = new LazyEval() {
      public Object getValue() {
        return catDao.findByPK(info.getCategoryId());
    id = le.getValue();However, this sound like a solution to a problem which should be done another way.

  • ORA-06502: numeric or value error, please tell me how to assign ...

    Dear all people!
    my code:
    declare
    string1 varchar2(300);
    string2 varchar2(65);
    begin
    string1 := ....
    string2 := substr(string1,1,60);
    end;
    when i run program in debug
    at command "string2 := substr(string1,1,60);" it raise error ORA-06502;
    Please tell me how to assign substr(string1,1,60) to string2 (max length of string2 is 65);
    I'm looking to forward to receiving your response!
    Thank you very much;

    Only INVALID_NUMBER exception is handled and also VALUE_ERROR should be handeled. You can resolve it by handling VALUE_ERROR exception or by adding WHEN OTHERS as I did in following example.
    SQL> create or replace FUNCTION to_number_or_null (
      2      aiv_number in varchar2 )
      3      return number is
      4     /*
      5     to_number_or_null.fun
      6     by Donald J. Bales on 12/15/2006
      7     An errorless to_number( ) method
      8     */
      9  begin
    10     return to_number(aiv_number);
    11     exception
    12     when INVALID_NUMBER then
    13      return NULL;
    14     when OTHERS then
    15      return null;
    16     end to_number_or_null;
    17  /
    Function created.
    SQL> select to_number_or_null('A') from dual;
    TO_NUMBER_OR_NULL('A')
    ----------------------With kind regards
    Krystian Zieja

  • How to assign a value to a parameter {?MyParam} dynamically?

    How to assign a value to a parameter {?MyParam} dynamically?
    Example:
      {?One_Or_Two}  <- my first parameter
      {?MyParam}       <- My second parameter
    The Code:
    If ( {?One_Or_Two} = 'One'  then
        {?MyParam}  = 'One' ;
    else 
        {?MyParam}  = 'Two' ; 
    (THIS IS NOT WORKING FOR ME!  ANYONE KNOW WHY?)
      IT NEVER ASSIGN THE VALUE?
    My Command query looks like:
    SELECT * FROM MyTable
        WHERE MyTable.MyColumn = {?MyParam}
    THANKS

    Hi Joseph,
    I'm a bit unclear as to what you are doing and from what I see you're running in circles. 
    Your Command query is looking for a field that is equal to {?MyParam}. 
    Now you want to take {?MyParam} in the report and change the value after you've set it. 
    Parameters cannot be set from the Command, you can format it and manipulate it but they cannot be set except from the parameters window or from a front-end. 
    Thanks,
    Brian

  • How to call HR Macros in ABAP-Webdynpro

    HI all,
    I want to extract HR data in webdynpro view.
    Where should I give Logical Database PNP?
    The ifnotypes key word is not accepting in Webdynpro coding?
    Where should I give GET PERNR event in Webdynpro?
    When I use RP_PROVIDE_FROM_LAST .... says error message
    Statement "RP_PROVIDE_FROM_LAST" is not defined. Check your spelling .
    How to use the Macros in Webdynpro (VIEW) methods.
    First time I'm working in ABAP-HR Webynpro.
    Please help me out..
    Thanks,
    Prasad

    Hi,
    How did u  solve this? pls provide the solution.
    Regards,
    Lakshmi.

  • How to assign numbers in external number range?

    Dear experts,
    Since NUMBER_GET_NEXT can only be used to assign numbers in internal number range, how to assign numbers in external number range?
    So far, I only know the NUMBER_CHECK function module to deal with external number ranges and it only check a number whether it lies in any external number range or not, but it doesn't update any number range status. What I need is a function module like NUMBER_GET_NEXT that supports external number range.
    Thanks in advance.
    Regards,
    Haris
    Edited by: harissahlan on Oct 19, 2011 5:44 AM

    With external number range, there is no updating of the number range objectt. The only thing you need to know is whether the number you wish to assign is allowed according to the external number range. And also check if there isn't already an object/document with the same number in the database.

  • How to assign a task to Reuestor in OIM 11g

    How to assign a task to a requestor (who has raised a request for other user).
    I created a Task assignment adapter and mapped variable in Process definition as
    Map To: Request Info
    Qualifier: Requester User Login
    Still it returns null and default task is assigning to System adminstrator. I am pasting the Task Assignment code here. User key value coming as Null.
    Do you have any idea what is the exact mapping required in Process definition.?? Pls note: I am using OIM version 11.1.1.5.0
    public class TaskAssignmentToUserAdapter {
         Logger logger = Logger.getLogger("COM.IDM.PROV.COMMON.ADAPTERS");
         public String getTargetType(String targetType){
              return targetType;
         public String assignTaskToUser(String userKey,tcDataProvider dataProvider ){
              System.out.println("The user key value:" +userKey);
              return userKey;
         }

    Not sure what sample code I can give you, but you need to do a query in your adapter like:
    select REQUEST_KEY from OIU where ORC_KEY='?'
    Here ORC_KEY should be mapped to the process instance key.
    Once you have the Request key, you can use RequestServcie APIs to get the requester information. http://docs.oracle.com/cd/E14571_01/apirefs.1111/e17334/oracle/iam/request/api/RequestService.html#getBasicRequestData_java_lang_String_
    Or if you don't care then get the requester key from the request table. Thus you can have the final query as:
    select USR_LOGIN from USR where USR_KEY=(select REQUESTER_KEY from REQUEST where REQUEST_KEY = (select REQUEST_KEY from OIU where ORC_KEY='?'))
    HTH,
    BB

Maybe you are looking for

  • Installing TaxCut 2007

    I can't install TaxCut 2007 from their CD. I get the following message: The Finder cannot complete the operation because some data in TaxCut 2007 could not be read or written. ERROR CODE 36 Anyone got any ideas?

  • Excel Export Error: Store must be open for this operation

    Hi, I’m currently running into an issue exporting Reporting Services reports to Excel that I haven’t encountered before. Unfortunately, I’m not able to find much information about this error directly related to SQL Server Reporting Services. The erro

  • Authroization issue after the Upgrade for Multiprovider

    Hello Experts, After the upgrade has carried out in my Quality system, I'm unable to execute a query because of the authorization issue with Multiprovider. But earlier the same Authorization was assigned to the ID. The Role in Q and the Role in P is

  • CFMail not sending

    I have a form that has two pages: the form itself, and an action page. The form consists of text boxes, radio buttons, and a place to attach a document. On the action page I have used cffile to save the file to the server, which it does correctly, an

  • Just upgraded from sl to Lion can't login?

    please help.