Hi All:
I am working on a code in Outlook and was wondering a few things regarding opening and manipulating an Excel Attachment.
1) Can I rename a tab on an Excel worksheet? Example
select the sheet titled Journal 2 and rename it to Journal
2) How do I physically select the sheet titled Journal?
In order for the macro “DelZeroRows” to function properly the sheet titled JOURNAL must be the active sheet. In most cases it is but in some cases another sheet is the active one when the file is open.
This line seems to work for Printing purposes but does not seet to make JOURNAL the active sheet:
Set xlwkbk = xl.Workbooks.Open(fileName)
Set xlwksht = xlwkbk.Sheets("JOURNAL")
xl.Run "DelZeroRows"
3) Lastly below is a snippet of the code I am using. Can the changes that were made to the Excel Attachment be Saved so that when I open the email next time I don't have to make the changes again? eg Run the macro
DelZeroRows again
[vba]
xlwksht.PrintOut
xlwkbk.Close False
Set xlwkbk = Nothing
End If
Next msgAttach
‘CAN I SAVE THE CHANGES THAT WERE MADE TO THE EMAIL ATTACHMENT BEFORE IT IS MOVED??????
Msg.Move Outlook.Session.GetDefaultFolder(olFolderInbox).Folders("Move to This Folder")
[/vba]
THANKS to anyone that can assist or direct me to another post.
Mark