joefrench
Active Member
- Joined
- Oct 4, 2006
- Messages
- 357
I have a workbook that will be acting as a "template". Upon an action, I have the file doing a save as. After the save as, I need to have the workbook publish a static html file. I cannot seem to get the code to do this.
This is what I have but I keep getting errors:
"A-062" is the "template" files name. The save as is being performed prior to the publishing. Is this where my problem is?[/code]
This is what I have but I keep getting errors:
Code:
Sub publish()
'
' publish Macro
' Macro recorded 10/10/2006 by Joe French
Dim strDir As String
strDir = "\\Cjdata1\design engineering common\Molds\" & Sheet2.Range("O1").Value & "\" & Sheet1.Range("J4").Value & "\Router\"
'
With ActiveWorkbook.PublishObjects("A-062_3870")
.Title = Sheet1.Range("J4").Value & "Router"
.Filename = strDir & Sheet1.Range("J4").Value & ".htm"
.publish (True)
End With
End Sub
"A-062" is the "template" files name. The save as is being performed prior to the publishing. Is this where my problem is?[/code]