Promasean
08-19-2011, 11:49 AM
I have a macro that fills an existing message with content based on what the attached filename is.
I need to set a variable for use in the macro equal to the contents of one cell on the attached excel workbook. The cell address does not change but the filename and worksheet name does.
I have tried several code snippits but can get nothing to work.
I am already getting the filename with the following code.
Set Outmail = Application.ActiveInspector.CurrentItem
If Outmail.Attachments.Count > 0 Then
var = Outmail.Attachments.Item(1).FileName
End If
I can get the worksheet name with no problem as it is in the filename.
Any help would be appreciated.
I need to set a variable for use in the macro equal to the contents of one cell on the attached excel workbook. The cell address does not change but the filename and worksheet name does.
I have tried several code snippits but can get nothing to work.
I am already getting the filename with the following code.
Set Outmail = Application.ActiveInspector.CurrentItem
If Outmail.Attachments.Count > 0 Then
var = Outmail.Attachments.Item(1).FileName
End If
I can get the worksheet name with no problem as it is in the filename.
Any help would be appreciated.