LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default Saving Workbook 2007 Format in Send Mail Q

I've just converted to Office 2007 and have an error when I try to use
Send Mail, with the message "The following Feature cannot be saved in
a macro free workbook" .VB Project. It debugs on the line below

.SaveAs TempFilePath & TempFileName & FileExtStr,
FileFormat:=FileFormatNum

However part of my code prior to this allocates the FileFormat number
to it for Excel 2007, see part below, all via Ron de Bruin. Any ideas?

With Destwb
If Val(Application.Version) < 12 Then
'You use Excel 97-2003
FileExtStr = ".xls": FileFormatNum = -4143
Else
'You use Excel 2007
'We exit the sub when your answer is NO in the security
dialog that you only
'see when you copy a sheet from a xlsm file with macro's
disabled.
If Sourcewb.Name = .Name Then
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
MsgBox "Your answer is NO in the security dialog"
Exit Sub
Else
Select Case Sourcewb.FileFormat
Case 51: FileExtStr = ".xlsx": FileFormatNum = 51
Case 52:
If .HasVBProject Then
FileExtStr = ".xlsm": FileFormatNum = 52
Else
FileExtStr = ".xlsx": FileFormatNum = 51
End If
Case 56: FileExtStr = ".xls": FileFormatNum = 56
Case Else: FileExtStr = ".xlsb": FileFormatNum = 50
End Select
End If
End If
End With
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Send Lous Notes 7 mail from Excel 2007 automatically apatil1 New Users to Excel 0 January 21st 11 09:59 AM
how do I send selected cells in an e-mail using excel 2007? Amanda Bledsoe Excel Discussion (Misc queries) 1 July 9th 08 09:41 PM
How can i password secure a workbook when i send it via e-mail AN Excel Discussion (Misc queries) 6 April 2nd 08 11:17 PM
Send as E-mail Document format (Excel 2007) emil Excel Discussion (Misc queries) 1 October 18th 07 08:32 PM
how to send a workbook shortcut as attachement in an e-mail from a userform Valeria[_2_] Excel Programming 5 January 22nd 04 12:02 PM


All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"