Hi, I have the following two macros - work well but saves files as docx
what changes do I have to make to save the files as docm?
Sub FileSaveAs()
Dim oCC As ContentControl
Dim strFilename As String
For Each oCC In ActiveDocument.ContentControls
If oCC.Title = "Filename" Then
If oCC.ShowingPlaceholderText = True Then
MsgBox "ðà ìøùåí ùí"
oCC.Range.Select
ElseIf InStr(oCC.Range.Text, "\") > 0 Or InStr(oCC.Range.Text, "/") > 0 Or InStr(oCC.Range.Text, ":") > 0 _
Or InStr(oCC.Range.Text, "*") > 0 Or InStr(oCC.Range.Text, "?") > 0 Or InStr(oCC.Range.Text, """") > 0 _
Or InStr(oCC.Range.Text, "|") > 0 Or InStr(oCC.Range.Text, "<") > 0 Or InStr(oCC.Range.Text, ">") > 0 Then
MsgBox "úååéí ìà çå÷ééí áùãä ùí ÷åáõ. /:\*|?""""<>"
oCC.Range.Select
Else
With Dialogs(wdDialogFileSaveAs)
.Name = oCC.Range.Text
.Show
End With
End If
Exit For
End If
Next oCC
End Sub
Sub FileSave()
Dim oCC As ContentControl
Dim strFilename As String
If ActiveDocument.Path = vbNullString Then
For Each oCC In ActiveDocument.ContentControls
If oCC.Title = "Filename" Then
If oCC.ShowingPlaceholderText = True Then
MsgBox "ðà ìøùåí ùí"
oCC.Range.Select
ElseIf InStr(oCC.Range.Text, "\") > 0 Or InStr(oCC.Range.Text, "/") > 0 Or InStr(oCC.Range.Text, ":") > 0 _
Or InStr(oCC.Range.Text, "*") > 0 Or InStr(oCC.Range.Text, "?") > 0 Or InStr(oCC.Range.Text, """") > 0 _
Or InStr(oCC.Range.Text, "|") > 0 Or InStr(oCC.Range.Text, "<") > 0 Or InStr(oCC.Range.Text, ">") > 0 Then
MsgBox "úååéí ìà çå÷ééí áùãä ùí ÷åáõ. /:\*|?""""<>"
oCC.Range.Select
Else
With Dialogs(wdDialogFileSaveAs)
.Name = oCC.Range.Text
.Show
End With
End If
Exit For
End If
Next oCC
Else
ActiveDocument.Save
End If
End Sub
Thanks