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

Try this. I also think the Cancel may have been in the wrong place:

Code:
Private Sub m_oThisApp_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
Dim oDialog As Dialog
  If ActiveDocument.FullName = ThisDocument.FullName Then Exit Sub
  If ActiveDocument.Path <> vbNullString Then Exit Sub
  If ActiveDocument.AttachedTemplate = ThisDocument.AttachedTemplate Then
    Set oDialog = Dialogs(wdDialogFileSaveAs)
    With oDialog
      .Format = 13
      .Show
    End With
    'I had the cancel in the wrong place. Suppress the normal dialog.
    Cancel = True
  End If
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote