Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

How to Disable Save message

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BJ Kea - 17 Jan 2005 21:31 GMT
We have written an VB application that takes user data from a form and
populates bookmarks on a Word Template.  The application has a Print Preview
feature that brings up the document in Word.  The dot is locked so the user
can't modify it, but when the red-x in the upper right hand corner is pressed
to go back to the application; the user is prompted to “Save” the .dot copy.

We disabled the first “Save” message for the .doc version by issuing
objword.activedocument.saved

But now there is a message to save the .dot version.  We have set the
documents “Read Only” property on so they can not save the document.  We
would rather they not receive the message at all.  We need a similar solution
to the above but for the .dot file.

Thanks
BJ
BJ KEA - 17 Jan 2005 23:19 GMT
This worked:
If strTypeOfPrint = "Preview" Then
   objWord.CommandBars("Standard").Visible = False    
   objWord.CommandBars("Formatting").Visible = False  
   objWord.CustomizationContext = objWord.ActiveDocument.AttachedTemplate
   objWord.CommandBars("File").Controls("&Save").Visible = False  
'.OnAction = "OverridePrint"
   objWord.CommandBars("File").Controls("Save &As...").Visible = False  
'.OnAction = "OverridePrint"
   objWord.CommandBars("File").Controls("P&rint...").Visible = False  
'.OnAction = "OverridePrint"
   objWord.CommandBars("File").Controls("Print Pre&view").Visible = False

   objWord.ActiveDocument.Protect wdAllowOnlyComments, , strLtrPsw
   'objWord.ActiveDocument.PrintPreview
   objWord.Visible = True
   objWord.ActiveWindow.Caption = "PREVIEW ONLY--DO NOT PRINT AND DO NOT
SAVE THIS TO ANY FILE"
   'NEED BOTH OF THESE LINES
   objWord.ActiveDocument.Saved = True
   objWord.Templates(1).Saved = True

> We have written an VB application that takes user data from a form and
> populates bookmarks on a Word Template.  The application has a Print Preview
[quoted text clipped - 12 lines]
> Thanks
> BJ
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.