Tnx, that works...
Is there also a way to do all HTML tags ? <b><u><i><h1><h2> etc.
h1 = wdStyleHeading1
h2 = wdStyleHeading2
etc.
But instead of the search and replace function can Word convert all the HTML
tags with a (builtin ?) function ? I probably still have to use a Macro, but
that is no problem.
> Hi,
> like this:
[quoted text clipped - 39 lines]
> Word XP, Win 98
> http://word.mvps.org/
Helmut Weber - 29 Dec 2004 12:13 GMT
Hi Grimmie,
...
answered one question and there comes the next one.
...
Try asking in microsoft.public.word.docmanagement.
The VBA group is kind of a group for do-it-yourselfers.
I don't know much about all that HTML-stuff.
Cheers.
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
>Tnx, that works...
>
[quoted text clipped - 50 lines]
>> Word XP, Win 98
>> http://word.mvps.org/
Grimmie - 29 Dec 2004 13:51 GMT
I thought this newsgroup was for asking VBA-related questions ?
And I am a programmer (SQL/ASP/C/XML/XSL/XSD/...), just not in VBA.
But tnx anyway.
Lesley Regan - 29 Dec 2004 16:31 GMT
Hi, Grimmie,
1. Word doc Save As Web Page
2. View, Html source
3. Paste in the text with HTML tags
See if that helps....Web pages have two faces -- a formatted front with no
tags, and a back with the HTML and text, as I'm sure you know.
I've tried different ways of translating the HTML tags into formatting on
the face of a Word document before and it's really an exercise in futility.
Regards,
Lesley
> I thought this newsgroup was for asking VBA-related questions ?
> And I am a programmer (SQL/ASP/C/XML/XSL/XSD/...), just not in VBA.
>
> But tnx anyway.
Helmut Weber - 29 Dec 2004 20:23 GMT
Hi Grimmie,
using a built in function has nothing to do with programming.
.Text = "(\<b\>)(*)(\</b\>)" ' bold
.Text = "(\<u\>)(*)(\</u\>)" ' underline
.Text = "(\<i\>)(*)(\</i\>)" ' italic
For heading:
With rDcm.Find
.Text = "(\<h1\>)(*)(\</h1\>)"
.Replacement.Text = "\2"
.Replacement.Style = "Überschrift 1" ' German Version
' Your stylename for heading 1
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
Otherwise, put the text in notepad.
Save it as "xyz.htm".
Open it with Word.
Confirm question for conversion.
HTH
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/