Hi Experts!
Need your help I just copied and modify this code;
What I want is to add sumting on the file name, without changing, file path, original file name and file extension
Say;
I get the file
D: \Docs\Memo.docx
I can paste it to the fnpath with a changed filename
C: \_Temp\ Memo_BPMC-0001.docx
Heres the code
Any help will be highly appreciated
Thanks in advance
Private Sub CommandButton1_Click()
Dim fn
Dim FSO As Object
Dim DOC_NUM As String
Dim fnpath As String
fnpath = Application.Path
fnpath = tempPath & "C: \_Temp\"
fn = Application.GetOpenFilename
If fn = False Then
MsgBox "Nothing Chosen"
Else
TextBox1.Value = fn
Set FSO = CreateObject("scripting.filesystemobject")
FSO.CopyFile Source:=fn, Destination:=fnpath
TextBox3.Value = fnpath
End If
End Sub
Bookmarks