View Single Post
 
Old 03-05-2015, 06:07 PM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,637
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Yes you should be able to use the BeforeSave event. See if this gets you started:

Code:
Option Explicit
Private WithEvents m_oThisApp As Application
Private Sub Class_Initialize()
  'Syncronize class with application.
  Set m_oThisApp = Word.Application
lbl_Exit:
  Exit Sub
End Sub
Private Sub m_oThisApp_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
Dim oDialog As Dialog
  If ActiveDocument.AttachedTemplate = ThisDocument.AttachedTemplate Then
    Cancel = True
    Set oDialog = Dialogs(wdDialogFileSaveAs)
    With oDialog
      .Format = 13
      .Show
    End With
  End If
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote