Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[b]Export to HTML... urgent[/b]

Status
Not open for further replies.
Jan 24, 2002
33
0
0
CA
Good morning everyone,

I really need help with this one... I've been looking for hours but nothing is close to what I need.

Simply put, I have a memo field which contains all the code to generate an HTML page. I just want to export that information into a new .html formatted doc so that I can view it with a browser. I actually need the static pages to upload to Ebay and I've devised an Access App that plugs data from tables into specific areas of the html document and stores it in a MEMO field in an access Table.

I just want to export the info the HTML format exactly the way it is... I tried Docmd.OutputTO and TransferText but it just doesn't work properly.

The only way it works is by cut and pasting the Memo field info into a blank txt file and renaming it. Maybe I can automate that process. Any suggestions.... Please !!!!
 
Hi
This might help
Code:
Private Sub cmdOutput_Click()
    Dim strPath, strResponse
    Dim fs, f
    'Directory and file name
    strPath = Me!Location & "\" & Me!Name
    If FileExists(strPath) Then
        strResponse = MsgBox("File exists. Overwrite?", vbYesNo, "FileExists")
    End If
    If strResponse = vbYes Then
        Set fs = CreateObject("Scripting.FileSystemObject")
        Set f = fs.CreateTextFile(strPath, True)
        'The memo field is called content
        f.write Me!Content
        f.Close
    Else
            MsgBox "Action Cancelled", , "Cancelled"
    End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top