Hi I'm new to this forum, and quite new to VBA.
I have some VBA code that copies each worksheet into a temp workbook then emails out the workbook as an attachement.
This is working very well, but now I am running the vba on a workbook which is populated from a 3rd party program. The problem is formatting.
The color format goes to pot when the temp workbook is created.
The VBA code upto the email text is below.
I guess I have to add some code for paste values & source formatting, but can't get it to work.
I have the related code below (this is just part of the code) thanks
For Each sh In ThisWorkbook.Worksheets
If sh.Range("A1").Value Like "?*@?*.?*" Then
sh.Copy
Set wb = ActiveWorkbook
TempFileName = "Sheet " & sh.Name & " of " _
& ThisWorkbook.Name & " " _
& Format(Now, "dd-mmm-yy h-mm-ss")
Set OutMail = OutApp.CreateItem(0)
With wb
.SaveAs TempFilePath & TempFileName & FileExtStr, _
FileFormat:=FileFormatNum
On Error Resume Next
Bookmarks