run time error 4160 bad file name

  • Hi all,


    I got 'run time error 4160 bad file name' with the following code. Any one can shed some light? That'd be much appreciated.


    Basically, I was trying to control Word through Excel. The code below is in a module in Excel. The file "test.docx" is already open.



    ......

  • Hello builudi,
    ,
    you nailed it- the problem is if it is open try this ,,,

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!