Hello
My code creates a folder with the name of an individual, say Smith John and then saves the document with the name John Smith letter.doc.
I need to have the Smith bit in the folder allcaps so it looks like SMITH John - can this be done. This is the code so far which does work.
regards
Pendle
strRoot = (where the folders are)
strSubFolder = strSurname & " " & strName
strFolder = strRoot & "\" & strSubFolder
strFileName = strName & " " & strSurname & " Offer Letter.doc"
strFullPath = strFolder & "\Contractual\" & strFileName
intResponse = MsgBox("Saving file as " & strFullPath & vbCrLf & vbCrLf & "Okay?", vbYesNo)
If intResponse = vbYes Then
If Dir(strFolder, vbDirectory) = "" Then
intResponse = MsgBox("Folder " & strFolder & " does not exist." & vbCrLf & "Create?", vbYesNo)
If intResponse = vbYes Then
MkDir strFolder
MkDir strFolder & "\Training"
MkDir strFolder & "\Benefits"
MkDir strFolder & "\Miscellaneous"
strFolder = strFolder & "\Contractual"
Else
strFolder = strRoot
strFullPath = ""
End If
End If
Else
My code creates a folder with the name of an individual, say Smith John and then saves the document with the name John Smith letter.doc.
I need to have the Smith bit in the folder allcaps so it looks like SMITH John - can this be done. This is the code so far which does work.
regards
Pendle
strRoot = (where the folders are)
strSubFolder = strSurname & " " & strName
strFolder = strRoot & "\" & strSubFolder
strFileName = strName & " " & strSurname & " Offer Letter.doc"
strFullPath = strFolder & "\Contractual\" & strFileName
intResponse = MsgBox("Saving file as " & strFullPath & vbCrLf & vbCrLf & "Okay?", vbYesNo)
If intResponse = vbYes Then
If Dir(strFolder, vbDirectory) = "" Then
intResponse = MsgBox("Folder " & strFolder & " does not exist." & vbCrLf & "Create?", vbYesNo)
If intResponse = vbYes Then
MkDir strFolder
MkDir strFolder & "\Training"
MkDir strFolder & "\Benefits"
MkDir strFolder & "\Miscellaneous"
strFolder = strFolder & "\Contractual"
Else
strFolder = strRoot
strFullPath = ""
End If
End If
Else