Dear Team,
Can any body explain how to save the active sheet name with current date and windows user name. Also explain how to call the
same in outlook.
Private Sub CommandButton1_Click()
ChDir "C:\TEMP"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\TEMP\ebin\Project-log.pdf", OpenAfterPublish:=True
Dim OutLookApp As Object
Dim OutLookMailItem As Object
Dim myAttachments As Object
Set OutLookApp = CreateObject("OutLook.application")
Set OutLookMailItem = OutLookApp.CreateItem(0)
Set myAttachments = OutLookMailItem.Attachments
With OutLookMailItem
.To = "ejoy@ccel.ae"
.Subject = "New Catalogue Request"
.Body = "New Catalogue Request"
myAttachments.Add "C:\TEMP\ebin\Project-log.pdf"
'.Send
.Display
End With
Set OutLookMailItem = Nothing
Set OutLookApp = Nothing
End Sub
Can any body explain how to save the active sheet name with current date and windows user name. Also explain how to call the
same in outlook.
Private Sub CommandButton1_Click()
ChDir "C:\TEMP"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\TEMP\ebin\Project-log.pdf", OpenAfterPublish:=True
Dim OutLookApp As Object
Dim OutLookMailItem As Object
Dim myAttachments As Object
Set OutLookApp = CreateObject("OutLook.application")
Set OutLookMailItem = OutLookApp.CreateItem(0)
Set myAttachments = OutLookMailItem.Attachments
With OutLookMailItem
.To = "ejoy@ccel.ae"
.Subject = "New Catalogue Request"
.Body = "New Catalogue Request"
myAttachments.Add "C:\TEMP\ebin\Project-log.pdf"
'.Send
.Display
End With
Set OutLookMailItem = Nothing
Set OutLookApp = Nothing
End Sub