• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Want to save as file in same location with formatting and paste special values without macro

Mohammad Shafaat

New Member
Code:
Option Explicit

Sub Send_Email_With_snapshot()
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Sheet1")
ActiveWorkbook.RefreshAll
Dim lr As Integer
lr = sh.Range("A" & Application.Rows.Count).End(xlUp).Row

sh.Range("A1:AG48").Select

With Selection.Parent.MailEnvelope.Item
    .to = "xyz@mail.com"
    .cc = ""
    .Subject = sh.Range("AN8").Value
    .attachments.Add "D:\n.xlsx"
    .send
   
End With
Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
Application.Quit
End Sub
 
Last edited by a moderator:

vletm

Excel Ninja
Mohammad Shafaat
You wrote that...
Want to save as file in same location with formatting and paste special values without macro
... and You sent a Macro ... about sending email ... hmm?
If something WITHOUT macro, then
... what would You really mean?
 

Mohammad Shafaat

New Member
Mohammad Shafaat
You wrote that...
Want to save as file in same location with formatting and paste special values without macro
... and You sent a Macro ... about sending email ... hmm?
If something WITHOUT macro, then
... what would You really mean?
thnx for your kind revert
Sir i want just saves as same file with same formatting paste values in same location and also attached this to same mail
 

vletm

Excel Ninja
Mohammad Shafaat
I could copy & paste my reply here, but ...
I'll try one more time get an answer ...
Your original 'hope' was '... without macro' - okay?
What would You like to do 'without macro'?
 

Mohammad Shafaat

New Member
I could copy & paste my reply here, but ...
I'll try one more time get an answer ...
Your original 'hope' was '... without macro' - okay?
What would You like to do 'without macro'?
thru vba how i save as same file in new location with new name with formatting and paste special values.without macro
 

Hui

Excel Ninja
Staff member
The only way to save as Values and Formatting is to use: Save As and select a Non-spreadsheet format

Try these and see how you go:
59813

Note the Text and CSV will loose formatting
 
Top