Hello, I have not posted here before but if someone could help me resolve this problem I would really appreciate it, as the other posts I have referenced have not been successful for me. I will lay out what my VBA form currently does.
-User submits info into a request form...
-This information goes to specific cells in a separate sheet in the workbook...
-A folder is automatically created on a shared network drive named using concatenate function of certain cells...
-Email is sent off to distribution list...The folder file path is added by referencing a cell (through concatenate function)
I am hoping to automatically hyperlink the "File Path" to open the newly created folder through the email. Is it possible to modify my current code to make this work?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim sTO As String, sSubj As String
sTO = [AE1]
sSubj = [AG1]
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = Range("AK1") & vbNewLine & _
"" & vbNewLine & _
Range("AM1") & vbNewLine & _
Range("BE1")
Above (BE1) is the reference cell which uses concatenate to add the file path of the new folder to the email...This is the goal hyperlinked folder
On Error Resume Next
With OutMail
.TO = sTO
.CC = ""
.BCC = ""
.Subject = sSubj
.Body = strbody
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
ActiveCell.Offset(1, 0).Select
ActiveWorkbook.Sheets("Data").Select
Application.DisplayAlerts = False
With ThisWorkbook
.Save
On Error Resume Next
ActiveWorkbook.RefreshAll
For i = 2 To 2
MkDir "C:\Users\SHARED DRIVE NAME\SETUP FOLDER\" & Range("O" & i)
Next i
Above is the newly created folder code
Unload Me
End With
End Sub
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks for any help, I really appreciate it.
-User submits info into a request form...
-This information goes to specific cells in a separate sheet in the workbook...
-A folder is automatically created on a shared network drive named using concatenate function of certain cells...
-Email is sent off to distribution list...The folder file path is added by referencing a cell (through concatenate function)
I am hoping to automatically hyperlink the "File Path" to open the newly created folder through the email. Is it possible to modify my current code to make this work?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim sTO As String, sSubj As String
sTO = [AE1]
sSubj = [AG1]
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = Range("AK1") & vbNewLine & _
"" & vbNewLine & _
Range("AM1") & vbNewLine & _
Range("BE1")
Above (BE1) is the reference cell which uses concatenate to add the file path of the new folder to the email...This is the goal hyperlinked folder
On Error Resume Next
With OutMail
.TO = sTO
.CC = ""
.BCC = ""
.Subject = sSubj
.Body = strbody
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
ActiveCell.Offset(1, 0).Select
ActiveWorkbook.Sheets("Data").Select
Application.DisplayAlerts = False
With ThisWorkbook
.Save
On Error Resume Next
ActiveWorkbook.RefreshAll
For i = 2 To 2
MkDir "C:\Users\SHARED DRIVE NAME\SETUP FOLDER\" & Range("O" & i)
Next i
Above is the newly created folder code
Unload Me
End With
End Sub
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks for any help, I really appreciate it.