Kath Pelletti
KP at sdsonline.net
Mon Sep 13 20:13:21 CDT 2004
I have wasted ages on this so am now begging assistance........
I have an html file (empty at present - later it will have some basic text)
I need to my code to
- Make a copy of the template.html file (I can do that) and
- give it a new name, eg. Template_BHP_140904.html (I can do that)
- Open the html file just created in Frontpage for users to modify the document (That's where I'm stuck....)
My problem is a total lack of knowledge of files vs. webs and therefore the syntax I need. Questions: -
- Do I have to have a 'web' or 'web folder' - can't I just have an html file and open it?
- If I can, what is the alternative syntax to .webs.open - eg. I am looking for a .pages.open property or .files.open ?
Here's my code so far - when I run it I get an error - There is no web named "/E:/SDS/Clients/CPP/WebLetters/Template.html"
--------------------------------------------------------------------------------
Private Sub CmdOpenFP_Click()
Dim oFPweb As FrontPage.Web
Dim oFP As FrontPage.Application
Dim FrontPageRunning As Boolean
'Determine whether FrontPage is alredy open or not
FrontPageRunning = IsFrontPageRunning()
If Not FrontPageRunning Then
MsgBox ("Frontpage is Closed")
Set oFP = CreateObject("Frontpage.Application")
Else
MsgBox ("Frontpage is already open")
Set oFP = GetObject(, "Frontpage.Application")
End If
'add code here later to make a copy of my file
'open file in front page------------------------------------------------
oFP.Webs.Open ("E:\Sds\Clients\CPP\Webletters\template.html") 'STUCK HERE
' Show FrontPage
oFPweb.Activate
'Set oFP = Nothing
End Sub
--------------------------------------------------------------------------------
TIA
Kath Pelletti
Software Design & Solutions Pty Ltd.
Ph: 9505-6714
Fax: 9505-6430
KP at SDSOnline.net