stop user saving across original

S

Smallweed

Hi, does anyone know a way in VBA to present the user with the Save As dialog
box but prevent them from saving across the original document? Obviously I
could have made it read-only but, earlier in the same macro, I need to write
some text to a document variable in the original (which I then can't save if
it's read-only...).
 
D

Doug Robbins - Word MVP

You should probably be starting with a template and be using
File>New>templatename (or in code Documents.Add("templatename") to create
the document. That way, the template is maintained unchanged.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
S

Smallweed

Thanks Doug - I know what you mean but there are reasons why I can't (there's
a fixed corporate template this document needs to remain attached to and
there's this doc variable I need to write to and save in the original).
However, I think I've cracked the problem using
Application.FileDialog(msoFileDialogOpen) and then testing the name of the
filename before running the save.
 

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