Ildestino
11-22-2012, 02:27 AM
Hey there!
Well Im having this issue, bout the VBA code that I wrote. Id like to include a predefined "Save as" whenever a user hits the "Save and Send button". I have like many users with different user profiles and Id like to user "My Documents" as predefined saving path.
Id be really really thankful if you can help me out with this one.
Kind regards
Ildestino
Sub SendGenericDocumentMail_PIR()
Application.Dialogs(xlDialogSaveAs).Show "DRF 16 Material " & Range("C34").Value
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "E-Mail adress"
.CC = ""
.BCC = ""
.Subject = "New Material" & " " & Range("E19").Value & " " & "Request" & " - " & Range("C34").Value
.Body = "Dear MDM Team, attached please find a material request. Kind regards"
.Attachments.Add ActiveWorkbook.FullName
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Well Im having this issue, bout the VBA code that I wrote. Id like to include a predefined "Save as" whenever a user hits the "Save and Send button". I have like many users with different user profiles and Id like to user "My Documents" as predefined saving path.
Id be really really thankful if you can help me out with this one.
Kind regards
Ildestino
Sub SendGenericDocumentMail_PIR()
Application.Dialogs(xlDialogSaveAs).Show "DRF 16 Material " & Range("C34").Value
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "E-Mail adress"
.CC = ""
.BCC = ""
.Subject = "New Material" & " " & Range("E19").Value & " " & "Request" & " - " & Range("C34").Value
.Body = "Dear MDM Team, attached please find a material request. Kind regards"
.Attachments.Add ActiveWorkbook.FullName
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub