Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to run MS office program thru cmd  (Read 5766 times)

0 Members and 1 Guest are viewing this topic.

habeeb4e

  • Guest
how to run MS office program thru cmd
« on: December 24, 2005, 05:17:09 AM »
Hi all,

Can u plz help me by showing some way to run MS office program like Access thru cmd command.

regards

GX1_Man

  • Guest
Re: how to run MS office program thru cmd
« Reply #1 on: December 24, 2005, 05:23:34 AM »
What are you trying to accomplish with this?

habeeb4e

  • Guest
Re: how to run MS office program thru cmd
« Reply #2 on: December 24, 2005, 06:03:58 AM »
I am trying to autmoate a process of importing txt files to multiple MS Access files. Thinking to have batch file that run each MS Access file separately and then thru Access I can import the txt files...so main objective is to open MS Access file thru the DOS batch file...

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: how to run MS office program thru cmd
« Reply #3 on: December 24, 2005, 06:39:21 AM »
The executable for Access is msaccess.exe, so yes you can run it from a batch file (you'll need a path of course).

There are not a lot of command line switches for Access. What are you planning to do once Access opens?

8)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

ghostdog74



    Specialist

    Thanked: 27
    Re: how to run MS office program thru cmd
    « Reply #4 on: December 24, 2005, 06:54:17 AM »

    habeeb4e

    • Guest
    Re: how to run MS office program thru cmd
    « Reply #5 on: December 24, 2005, 06:56:15 AM »
    once Access open, I want to import txt files into predefined tables...
    I am trying to make this process automated since I got too many txt files to be imported to multi Access mdb

    habeeb4e

    • Guest
    Re: how to run MS office program thru cmd
    « Reply #6 on: December 24, 2005, 07:12:44 AM »
    sorry...can I reformelate my question to be like this...I need the batch file to open specific Access programms then after that the thru Access I can import the txt files

    Thanks

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: how to run MS office program thru cmd
    « Reply #7 on: December 24, 2005, 07:22:40 AM »
    From the reference posted by Ghostdog74, you can use the /x switch to run a macro when Access is executed. You cannot pass instructions from the DOS command line to Access.

    An alternative way would be to write a script to create a Access object. The script would be able to pass instructions to the Access object.

    Good luck. 8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    habeeb4e

    • Guest
    Re: how to run MS office program thru cmd
    « Reply #8 on: December 24, 2005, 07:30:17 AM »
    Thanks and Merry Christmas