I am looking to set up a macro to save 6 different worksheets as individual HTML files daily with the current date. I can find the code for saving as current date, and code for saving as HTML, I cannot figure out how to make them work together. My first of the 6 sheets is named Admin. Thank you for any help you can give me learning this one.
Here is the code I am currently trying and get errors with:
Sub SaveAsHTML()
'
' SaveAsHTML Macro
'
' Keyboard Shortcut: Ctrl+h
'
Dim newFile As String, fName As String
fName = Range("A1").Value
newFile = fName & " " & Format$(Date, "mmddyy") & ".htm"
With ActiveWorkbook.PublishObject.Add(xlSourcePrintArea, _
"J:\Service Technology\Daily Stats\CSC Daily Report\Archive\Admin\fname" _
, "Admin", "", xlHtmlStatic, "CSCDailyReport_29344", "")
.Publish (True)
.AutoRepublish = False
End With
End Sub