Results 1 to 11 of 11
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Portland, Maine, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format a variable?

    I have a form for users to enter text which I am storing to an autotext to be used elsewhere in the document. Next to the text box, I have checkboxes for Bold, Italic, and Underline. How do I apply the formatting to the variable?

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Format a variable?

    You can't apply any formatting to the text while it is stored in a string.

    You might be able to try temporarily typing the variable in as text (say, to the end of the document), applying the font formatting to it as specified by the user, saving this formatting text as an autotext, and then deleting it.

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Portland, Maine, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format a variable?

    That is what I thought. Thank you!

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Format a variable?

    If your intention is to provide your users with a visual indication of the formatting they are applying, you could attach an additional label containing some text (e.g. Sample) and each time the user applies some formatting reassign the label font property to match. Just an idea.

    Andrew C

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format a variable?

    If you have VB6 or any of its incarnations, you have the Richtextbox control. That would look nice on the screen. When the user clicks the underline box, the text would display underlined in your rtbox control.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  6. #6
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Portland, Maine, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format a variable?

    Thanks for the suggestion Kevin. Until now I have only worked with VBA, but I might give this a shot.

  7. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format a variable?

    You can use the richtextbox with VBA. Just add it to the control toolbox (using the additional controls button). If you don't have VB6 or MOD or Visusal Studio bla bla bla you won't have the "license" to us it. BUT, if you do you'll be able to drop one on a form and make it work. Just try it to see if you have the "license."
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    MOD - distribute richtext control?

    MS implies that additional controls will be packaged for distribution. Is it really true? Does this mean anyone with MOD could package a form containing the richtext control, post it here, and once we installed it, we'd all have it?

    <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q240/9/56.ASP>http://support.microsoft.com/support/kb/ar...s/Q240/9/56.ASP</A>

  9. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MOD - distribute richtext control?

    Why not try it and test? Go ahead and post. I'll try your form in Word 97 and see if the rtcontrol works on a PC w/o VB6.

    Is that what you had in mind?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  10. #10
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: MOD - distribute richtext control?

    I was hoping someone else would do it. <img src=/S/wink.gif border=0 alt=wink width=15 height=15> I haven't used the packager wizard, and don't have time to learn it this week... Any volunteers?

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MOD - distribute richtext control?

    Once you installed the database, you'd have a runtime license to use that database with the control in it. You wouldn't have a license to develop with that control, if that's what you mean.
    Charlotte

Posting Permissions

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