![]() |
#5
|
||||
|
||||
![]()
Your document also saves as strFilename, which doesn't exist in your code. As Paul indicates the document should be docx format and the code is in the template. The code when edited to
Code:
Option Explicit Private Sub Document_New() Dim intChoice As Integer Dim strPathName As String intChoice = Application.FileDialog(msoFileDialogSaveAs).Show If intChoice <> 0 Then strPathName = Application.FileDialog(msoFileDialogSaveAs).SelectedItems(1) ActiveDocument.SaveAs2 Filename:=strPathName, FileFormat:=wdFormatXMLDocument End If End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
cbalogh | Word | 6 | 01-27-2014 05:50 PM |
![]() |
eNGiNe | Word | 2 | 01-23-2014 06:27 AM |
![]() |
lgillespie | Word | 6 | 09-09-2013 03:13 PM |
![]() |
rossi45 | Excel Programming | 1 | 05-11-2012 03:05 PM |
Template "File In Use" when opening 2 documents based on the same template | wendt | Word | 5 | 12-15-2009 12:37 AM |