Results 1 to 3 of 3

Thread: html file adding "'s

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424

    html file adding "'s

    I'm using this code to transfer html tags from from my database to an html file. However, during the writing process two "s are added to the front and back end of the file because it's a string. How can I write to a file and not include the "s? The codes still launch ok and I can preview what it's going to look like but the "s detract from the look.

    VB Code:
    1. Dim temppath As String, slength As Integer, strFilename As String, strTags As String
    2. Dim tagfile As SHELLEXECUTEINFO
    3. temppath = Space(255)
    4. slength = GetTempPath(255, temppath)
    5. temppath = left(temppath, slength)
    6. strFilename = temppath & "tmptags.html"
    7. strTags = Tags.Value
    8. If Dir(strFilename) <> "" Then Kill (strFilename)
    9. Open strFilename For Output As #1
    10. Write #1, strTags
    11. Close #1
    12. With tagfile
    13.      .cbSize = Len(tagfile)
    14.      .hwnd = Me.hwnd
    15.      .lpDirectory = temppath
    16.      .lpFile = temppath & "tmptags.html"
    17.      .lpVerb = "open"
    18.      .nShow = SW_SHOWNORMAL
    19. End With
    20. Call ShellExecuteEx(tagfile)

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Use Print, not Write.... It's the Write command that's putting it on there....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424
    thanks, gnome..that's what I was looking for.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width