Closing MSWord Read-Only file

C

Carol Giannini

I have created a merge template ("Document.dot") that contains a macro to
perform the merge and other subsequent actions. The last macro step is to
close the original merge document without changes:

' Close the original merge form
Documents("Document.dot").Close SaveChanges:=wdDoNotSaveChanges

This works fine. Now I want to make the template Read-Only to protect it
from inadvertent user changes. When I do that, I get an error message saying
the document doesn't exist. I've tried including "(Read-Only)" in the
document name, which is how the document name appears in Word, but that
doesn't work. Is there a way to do this using the simple code above? If
not, what do I need to do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top