Results 1 to 2 of 2

Thread: WORD: formatting text -> who knows the format characters

  1. #1

    Thread Starter
    Addicted Member c@lle's Avatar
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    179

    Question

    This is the stuff I have:
    - plain text (with 'tags' e.g. "this is <b>bold</b>."
    - a connection to word (via "dim objWord as word.application")


    I can paste the text into a word document, but my question is the following:

    can I convert the text string, via inserting formatting characters, so that word will display the text correctly ('bold' in bold)

    PS: I know that i can 'toggle' bold on and off, but I want to send just one string, together with the formatting (kind of RTF).

    Who knows these formatting characters??

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986

    Isn't word the same As RichTextBox?

    When making bold in RichTextBox, you could use this code, I think it's the same, so just send this to Word

    Code:
    {\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}}
    {\colortbl\red0\green0\blue0;}
    \deflang1043\pard\plain\f0\fs17 Hi!
    \par }
    Remove the Hi! with something you want to be displayed bold.

    I haven't tested it, so I'm not sure at all if it will work
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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