BigDelGooner
Board Regular
- Joined
- Aug 17, 2009
- Messages
- 197
I am trying to email the activework I have open using the code below:
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olMailItem)
myitem.SentOnBehalfOfName = "S&Co - SAA Modelling"
myitem.To = recip
myitem.Subject = "Portfolio Modelling Request Completed"
myitem.Attachments.Add ActiveWorkbook.FullName
myitem.Display
I have 2 problems here:
- I know there are easier ways of sending the open workbook, however this is the only method I know that allows me to use the '.sentonbehalfofname' function.
- The sheet I am trying to send is an .xlt file so when this method uses the 'Attachments.Add ActiveWorkbook.FullName' line it actually attaches the original .xlt file and not the edited / open version on the screeen.
I guess if I could get the filepath of the open .xlt file rather than the original it would over come this problem!
PLEASE HELP!!!
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olMailItem)
myitem.SentOnBehalfOfName = "S&Co - SAA Modelling"
myitem.To = recip
myitem.Subject = "Portfolio Modelling Request Completed"
myitem.Attachments.Add ActiveWorkbook.FullName
myitem.Display
I have 2 problems here:
- I know there are easier ways of sending the open workbook, however this is the only method I know that allows me to use the '.sentonbehalfofname' function.
- The sheet I am trying to send is an .xlt file so when this method uses the 'Attachments.Add ActiveWorkbook.FullName' line it actually attaches the original .xlt file and not the edited / open version on the screeen.
I guess if I could get the filepath of the open .xlt file rather than the original it would over come this problem!
PLEASE HELP!!!