Solved

Command to ignore/disable save command in Word (2003)

Posted on 2008-06-11
4
534 Views
Last Modified: 2012-06-27
I want to be able to run macro that will prevent the save option being available in word (2003) - until I enable it again.

Is there an "on save " event or something similar?

Or another method?

Thanks Lou
0
Comment
Question by:Louverril
  • 2
4 Comments
 
LVL 3

Expert Comment

by:NizzeK
Comment Utility
Hi!
Is it not enough to create a password for not read-only access (tools/options/security)?
This will guide in disabling the menu item:
http://office.microsoft.com/en-us/ork2000/HA011380601033.aspx

Best regards
Nils
0
 

Author Comment

by:Louverril
Comment Utility
Hello Nizzek,

No this is not sufficient as the document is a form ans I want to disable save if all the fields have not been completed. If they have I want save to be available.

Thanks Lou
0
 
LVL 19

Accepted Solution

by:
dlc110161 earned 500 total points
Comment Utility
The problem that you will have is that there are many Save events available and you will have to hijack all of them.

FileSave
FileSaveAll
FileSaveAs
FileSaveAsOtherFormats
FileSaveAsWebPage
etc.

Dawn Crosier-Bleuel
Word MVP

Sub FileSaveAs()
 

If ActiveDocument.FormFields("txtUserName").Result = "" Then

    Exit Sub

Else

    Application.Dialogs(wdDialogFileSaveAs).Show

End If

End Sub

Open in new window

0
 

Author Closing Comment

by:Louverril
Comment Utility
Brilliant just what I need.
Thank you thank you thank you!!!!!!

Lou
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now