I have a macro writen in excel 2010 to create an Outlook email with the workbook as an attachement. Was working great in 2010, but as the work place upgrade to 2013, the macro falls ove at the email generation.
Can any one help with converting the following macro code to work in 2010 & 2013 versions of excel please?
strOriginalName = ActiveWorkbook.FullName
strName = ActiveWorkbook.Name
strUserName = ActiveSheet.Range("D9")
strUserName2 = ActiveSheet.Range("D11")
strDate = Format(Date, "dd-mmm-yyyy") & " " & Format(Time, "hh-mm")
ActiveWorkbook.SaveAs "H:\My Documents\" & strUserName & " " & strUserName2 & " " & "LEAVE_REQUEST_" & strDate & ".xlsm", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
strCurrentName = ActiveWorkbook.Name
' send REQUEST as attachment by email with subject as per requests status, version, Category & purpose etc.
Application.Dialogs(xlDialogSendMail).Show arg1:=Range("D57").Value, arg2:=strCurrentName
'Sub CloseandSave()
ActiveWorkbook.Close SaveChanges:=True
End Sub "