B
Bruno Coelho
hi, i have this simple code that saves to a normal document from a template.
Sub AutoClose()
Dim Savepath As String
Dim DocumentName As String
Dim box As String
Savepath = "G:\Administrativos\Credenciais de Deslocação\Dr. Carlos
Pinto\Credenciais Guardadas\"
box = InputBox("Qual o nome que deseja guardar", "Guardar")
DocumentName = box + Format(Now, "YYYY-MM-DD")
ActiveDocument.SaveAs FileName:=Savepath + DocumentName
End Sub
When i click on the close button it saves correctly and save it in normal
document, know, my question is when i open the normal document and close it
it appears again th InpuBox and saves again.
In the template, how can i do in VBA when save eliminate the code VBA of the
normal document.
Thanks
Sub AutoClose()
Dim Savepath As String
Dim DocumentName As String
Dim box As String
Savepath = "G:\Administrativos\Credenciais de Deslocação\Dr. Carlos
Pinto\Credenciais Guardadas\"
box = InputBox("Qual o nome que deseja guardar", "Guardar")
DocumentName = box + Format(Now, "YYYY-MM-DD")
ActiveDocument.SaveAs FileName:=Savepath + DocumentName
End Sub
When i click on the close button it saves correctly and save it in normal
document, know, my question is when i open the normal document and close it
it appears again th InpuBox and saves again.
In the template, how can i do in VBA when save eliminate the code VBA of the
normal document.
Thanks