Hi Guillermo,
No, it is not possible. You must insert text into a document and then format it. You can insert the whole string in the document and then use the Selection or a Range object to select each part in turn and format it. Alternatively, you can insert each part of the string, format that part, then insert the next part, format that, etc.
-- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
On Wed, 01 Mar 2006 22:43:22 +0100, Guillermo <guillermo[ at ]deletethislopez-anglada.com> wrote:
[Quoted Text] > >Hello everyone, > >I'm sorry if I'm asking something obvious, but I'm at lost with this. > >In the line > >.Text = b & "[[" & a & " (md)]]" > >below I'd like to apply different formats to b, "[[" and " (md)]]" and b (i. e. >different font colors, etc). > >Is it possible to format this text before adding it to the document (before the >replace command is executed)? > >Thanks, > >Guillermo >
|