|Hello, i am writing for the first time on this forum and i appologise for my english.|
. I'm glad that i have found a part of the solution for saving one word file to difrent locations with these code
Dim strFN As String
Dim strFX As String
Dim strL1 As String
Dim strL2 As String
'setup two locations - ending with /
strL1 = "H:/"
strL2 = "C:/Temp/"
'get filename from user
strFN = InputBox("Enter file name without extension", "Save to Stick and HDD")
'check for no file extension
If InStr(1, strFX, ".") > 0 Then
strFX = Left(strFX, InStr(1, strFX, "."))
'get existing filename and extract file extension
strFX = ActiveDocument.Name
'test for file extension on current document
If InStr(1, strFX, ".") = 0 Then
'none so use a default
strFX = ".doc"
strFX = Right(strFX, Len(strFX) - InStr(1, strFX, ".") + 1)
'create the filename
strFN = strFN & strFX
'save to stick first
ActiveDocument.SaveAs FileName:=strL1 & strFN
'save to HDD second
ActiveDocument.SaveAs FileName:=strL2 & strFN
Now my question is can i insert the date and hour automaticly as file name in stade of typing the name of file in the input box ?
please can you help me ? Thank you.