DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: VBA / Word 2007

  1. #1
    Join Date
    Feb 2008
    Posts
    8

    VBA / Word 2007

    Is there a way to hide or get rid of the save button in Word 2007? It is no longer on the "standard" commandbar anymore. Is there a way to access the new commandbar that the save button resides on?

  2. #2
    Join Date
    Dec 2003
    Location
    San Diego
    Posts
    202
    I don't know that you can hide the Save button from being displayed in the UI, but you can capture Word command events, including Save.

    See this page for details,

    http://word.mvps.org/faqs/MacrosVBA/...tSavePrint.htm

    Good luck,
    Michael Sanchez
    Managing Technical Editor
    Forum Moderator
    FreeVBCode.com

  3. #3
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Do you simply want to disable the ability to Save and force a Save As?

  4. #4
    Join Date
    Feb 2008
    Posts
    8

    ...

    I don't want them to "save as" either. These are legal documents and I don't want them saved off somewhere else on the hard drive which is why I don't want the "save as" either. I delete the document off of the local machine as soon as they are done with it. In Word 2003 and prior, I have removed the save button and the save from the file menu. I have added my own save button. The problem is that if I don't get rid of the windows save button, I can't tell whether the save came from the save button or the auto save. When the user presses the save button, I save the document out to the network and update some database tables. I don't want to do this if it is an auto save. I can turn off the auto save but if the user goes back and turns it on, I can no longer turn it off.

    I found where I can add buttons to the quick access toolbar, can I remove also?

  5. #5
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    If these are documents they can not make changes to or save, then wouldn't it be simpler to create them as PDF files, and use the PDFs for display?

  6. #6
    Join Date
    Feb 2008
    Posts
    8
    I want them to be able to save but it has to go thru my save function. I can intercept the call but I can't tell the difference between the windows save button and the autosave which is why I disable the windows and create my own.

    I have tried to disable the autosave but the user can go in and override it.

  7. #7
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Quote Originally Posted by JimFromTN
    I have tried to disable the autosave but the user can go in and override it.
    Jim: If a user has this kind of skill set, there probably isn't all that much you can do that he/she can't either undo, or get around.

    Try including this macro
    Code:
    Sub FileSave()
    'call your save function here
    End Sub

Similar Threads

  1. Replies: 2
    Last Post: 08-28-2007, 01:34 PM
  2. Security problem with Word 2007 Add-in
    By theWizard in forum .NET
    Replies: 2
    Last Post: 04-20-2007, 08:18 AM
  3. Smart tags Word 2007
    By theWizard in forum .NET
    Replies: 0
    Last Post: 03-16-2007, 06:46 AM
  4. Javascript to VBA for Word
    By Mouckster in forum VB Classic
    Replies: 0
    Last Post: 09-16-2005, 05:00 PM
  5. Any word on the future of VBA?
    By Paul Mc in forum .NET
    Replies: 4
    Last Post: 07-03-2001, 11:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center