dcsimg
Results 1 to 5 of 5

Thread: Problem concatenating paragrahs in to one line

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2020
    Posts
    2

    Problem concatenating paragrahs in to one line

    txtfile.Write "#p3 {color: rgb(255,255,0);font-size:12pt;font-family:Lucidabright;font-style:regular;font-weight: normal}" & vbCrL
    txtfile.Writeline "#p3a {color: rgb(255,255,0);font-size:122pt;font-family:Lucidabright;font-styleemibold;font-weight:Bold}" & vbCrL

    txtfile.Write <p id=p3a>OrderID: " & "<p id=p3>"12457 " & ""

    Expected results

    OrderID: 12457

    This is what i get

    OrderID:
    12457

    can someone help to achieve expected results or is there a better way of doing this? i will appreciate.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,796

    Re: Problem concatenating paragrahs in to one line

    Code:
    txtfile.Write <p id=p3a>OrderID: " & "<p id=p3>"12457 " & ""
    That writes two paragraph tags...if you only want one paragraph tag, then only write one.
    Also, if you open a paragraph, you should close it with a </p> as well.

    -tg
    * 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
    New Member
    Join Date
    May 2020
    Posts
    2

    Re: Problem concatenating paragrahs in to one line

    Quote Originally Posted by techgnome View Post
    Code:
    txtfile.Write <p id=p3a>OrderID: " & "<p id=p3>"12457 " & ""
    That writes two paragraph tags...if you only want one paragraph tag, then only write one.
    Also, if you open a paragraph, you should close it with a </p> as well.

    -tg
    Thanks for this, however the reason why i have two paragraphs is because of text formatting. One paragraph is bold then the other is normal text. Is there a way on one paragraph i can part of the text being bold and normal?

  4. #4
    Frenzied Member PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Newport, UK
    Posts
    1,196

    Re: Problem concatenating paragrahs in to one line

    Quote Originally Posted by mcrono View Post
    Thanks for this, however the reason why i have two paragraphs is because of text formatting. One paragraph is bold then the other is normal text. Is there a way on one paragraph i can part of the text being bold and normal?
    https://www.w3schools.com/html/html_formatting.asp

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,796

    Re: Problem concatenating paragrahs in to one line

    Quote Originally Posted by mcrono View Post
    Thanks for this, however the reason why i have two paragraphs is because of text formatting. One paragraph is bold then the other is normal text. Is there a way on one paragraph i can part of the text being bold and normal?
    Use either DIV or SPAN tags then. I'd apply the styles as class rather than ID though.

    -tg
    * 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??? *

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width