How do I automatically open a Word document at startup?

So that 2 specific Word documents open automatically each time I start up, I've created shortcuts to them and placed these in the Startup menu. This has worked fine in the past, but not anymore.


At startup, 'X.docx' opens, and so does 'Y.docx'. And another Word window with a File In Use dialogue box saying

X.docx is locked for editing by 'Andrew Dillon'.

Do you want to:

[radio buttons]

  • Open a Read Only copy
  • Create a local copy and merge your changes later
  • Receive notification when the original copy is available

[OK / Cancel]

And another Word window with a File In Use dialogue box saying Y.docx...

Looking in Windows' configuration editor (msconfig), Startup tab, X.docx & Y.docx are listed twice. I can disable 1 of each, but this doesn't solve it, as 0 then open at startup.

Thank you for your help!

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

See the article "I keep getting files that I am working on locked for editing. Word only allows me to open them read-only” at:

http://www.word.mvps.org/FAQs/AppErrors/LockedFiles.htm

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks for your help, but not appropriate for my case. I'm using Win7, locking doesn't occur when anything crashes, and I've only just done all the cleanups described. Thanks anyway, though.

Andrew.

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Instead of putting the documents in Startup, you might create an AutoExec macro that opens the documents when you start Word. You can also create a command line that opens Word with a specific document, though I don't think it would work for two.       
Microsoft MVP (Word) since 1999
Fairhope, Alabama USA
http://ssbarnhill.com
http://wordfaqs.ssbarnhill.com
Screen shots captured with TechSmith's Snagit

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks. Unfortunately I don't really have time to learn about macros. I was hoping there might be some way to edit msconfig, perhaps. Or that someone may know what I seem to be doing wrong. But thanks - I'm sure that answer will help someone else.
Andrew.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I was suspecting that one of the others here would provide you with a macro.
Microsoft MVP (Word) since 1999
Fairhope, Alabama USA
http://ssbarnhill.com
http://wordfaqs.ssbarnhill.com
Screen shots captured with TechSmith's Snagit

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

You could use the following AutoExec macro that you add to the Normal template:

Sub AutoExec()
Application.Documents.Open "C:\Users\SB\Desktop\myfirstexample.docx"
Application.Documents.Open "C:\Users\SB\Desktop\mysecondexample.docx"
End Sub

Of course, you will have to adjust the paths so that they point to actual files on your machine.

For installation instructions, see http://www.gmayor.com/installing_macro.htm.

Stefan Blom
MS 365 Word MVP since 2005
Volunteer Moderator
MS 365, Win 11 Pro
~~~
Note that I do not work for Microsoft
https://mvp.microsoft.com/
~~~
Please specify Word version & OS in your question

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks. Though if a startup shortcut to a document opens it in duplicate, won't a startup shortcut to WINWORD.EXE do the same?

Followed instructions, and on double-clicking WINWORD.EXE, a Microsoft Visual Basic dialogue box opens, saying

Run-time error '5174':

This file could not be found.

("C:\Users\...\X.docx")

Path is correct, unless it should say Documents rather than My Documents.

On clicking Debug, it shows this, highlighted:

Application.Documents.Open "C:\Users\Andrew\My Documents\X.docx"

Thanks for your help.

Andrew.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

On Windows 7 I believe the folder is called "Documents" rather than "My Documents" (at least on my installation). You can verify it by clicking to select the path in the address bar of Windows Explorer (so that it displays with backslashes rather than with arrows).

Stefan Blom
MS 365 Word MVP since 2005
Volunteer Moderator
MS 365, Win 11 Pro
~~~
Note that I do not work for Microsoft
https://mvp.microsoft.com/
~~~
Please specify Word version & OS in your question

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I never knew clicking address bar did that! Can't imagine how you found out, as it's not something you'd think to do.

Yes, just Documents.

1.    Unfortunately, if shortcut to WINWORD.EXE is then placed in startup folder, a 3rd Word window (not 4th) still opens, with 1 of 2 things:

-    an MVB dialogue box saying

Run-time error '4198':

Command failed

with Application.Documents.Open "C:\Users\Andrew\My Documents\X.docx" highlighted again.

-    a File In Use dialogue box saying

X.docx is locked for editing...

I should say that, before this, I get the error message

The document 'X.docx' caused a serious error last time it was opened. Would you like to continue opening it?

I always say Yes because it never makes any difference.

3rd & 4th documents are Document1 and Document2.

2.    If instead of placing the WINWORD.EXE shortcut in the administrator's startup folder, I place it in that for All Users, it doesnt open at all. It isn't in msconfig. And the shortcut to the Firefox browser, in the administrator's startup folder, takes its time opening. When it does, it won't connect to any website.

3.    When the WINWORD.EXE shortcut is back in the administrator's startup folder, Word & Firefox behave as they did before.

Thanks for your help.

Andrew.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

I suggest that you dispense with the shortcuts and instead use an Autoexec macro in the Normal.dotm template as suggested by Stefan.
Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com
It's time to replace ‘Diversity, Equity & Inclusion’ with ‘Excellence, Opportunity & Civility’ - V Ramaswamy

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
 

Question Info


Last updated December 17, 2024 Views 6,915 Applies to: