none
Start word with my parameters RRS feed

  • Question

  • I've looked at the switch available to start Word.

    What I'd like to do is start WORD and send it some specific parameters. 

    For example, I'd like to start WORD and pass in the person's favorite color (note not what I really want to do but just used this example since it was simple to explain).

    I'd appreciate any ideas.

    Thanks,

    MEG

    Tuesday, August 21, 2012 5:09 AM

Answers

  • You can't create switches. However, there are lots of ways of getting information to Word/to a specific document, so you can probably achieve your goal some other way.

    This thread recently dealt with almost the same issue.

    I think the biggest factor here is how you're launching Word. Is it to be done by a user from a desktop icon? If so you may need an AddIn. However launching it from within a program, you may be fine with Interop/Automation, which is simpler.

    • Marked as answer by AGI_MEG Tuesday, August 21, 2012 4:15 PM
    Tuesday, August 21, 2012 10:07 AM

All replies

  • You can't create switches. However, there are lots of ways of getting information to Word/to a specific document, so you can probably achieve your goal some other way.

    This thread recently dealt with almost the same issue.

    I think the biggest factor here is how you're launching Word. Is it to be done by a user from a desktop icon? If so you may need an AddIn. However launching it from within a program, you may be fine with Interop/Automation, which is simpler.

    • Marked as answer by AGI_MEG Tuesday, August 21, 2012 4:15 PM
    Tuesday, August 21, 2012 10:07 AM
  • I plan to launch it from another application (so similar to a command line).

    I believe I could use the users login information to determine the logic I need to run.

    I believe that is available to VBA using Environ("USERNAME").

    Thanks for the idea and assistance. 

    MEG

    Tuesday, August 21, 2012 4:15 PM
  • You can not pass parameters directly to Word at startup.


    Word MVP

    Sunday, August 26, 2012 6:20 AM