groovygarden
Programmer
- Aug 23, 2001
- 63
Hi,
I have a macro which allows people in my department to save a file normally and also save it as a htm file to our website.
ActiveDocument.Save
ChangeFileOpenDirectory "\\war00160\c$\Inetpub\ ActiveDocument.SaveAs FileName:="?????.htm", FileFormat:=wdFormatHTML, AddToRecentFiles:=True
End Sub
This works fine, except that that the htm file name should be the same as the normal (.doc) file. So if I have an existing document called test.doc, when I run this macro I want it to save changes to test.doc, but also to save a .htm version in the specified folder with the name test.htm. How do I specify the name of the .htm page?
I know could code it in (FileName:="test.htm" but this would mean a different macro for each file...
Hope I've explained this OK! Any help appreciated!
I have a macro which allows people in my department to save a file normally and also save it as a htm file to our website.
ActiveDocument.Save
ChangeFileOpenDirectory "\\war00160\c$\Inetpub\ ActiveDocument.SaveAs FileName:="?????.htm", FileFormat:=wdFormatHTML, AddToRecentFiles:=True
End Sub
This works fine, except that that the htm file name should be the same as the normal (.doc) file. So if I have an existing document called test.doc, when I run this macro I want it to save changes to test.doc, but also to save a .htm version in the specified folder with the name test.htm. How do I specify the name of the .htm page?
I know could code it in (FileName:="test.htm" but this would mean a different macro for each file...
Hope I've explained this OK! Any help appreciated!