
Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
there
Helmut Weber skrev:
> Hi BP,
>
> for tagging in general,
> I remove formatting from paragraphs marks beforehand,
Yes, so obvious and I didn't think of it!
> and not only from paragraph marks, but from other
> control characters as well, like linefeed, end-of-cell,
> end-of-row, new page, new section etc.
Yhe only ones of these I know how to search for are
^p = paragraph mark
^n = column break
^l = manual linebreak
^m = manual page break
^b = section break
how do I find the others?
> Bold text may spread over several paragraphs,
> several cells. A paragraph mark may be bolded,
> but be preceeded by not bold text and followed by bold text.
Yes that too. IMHO it seems a bit daft that invisible characters
*can* have a style/format at all, especially as there is no italic
correction like in TeX anyway.
> So just to deal with a paragraph mark,
> if at the end of your found text,
> may cure your problem today,
> but wouldn't be a general solution.
Very true. BTW is there something like a
.Font.Normal property, or do I have to explicitly
set each possible styles to False?
> --
> Greetings from Bavaria, Germany
Vielen Dank und Gr?sse aus Schweden! :-)
> Helmut Weber, MVP WordVBA
>
[quoted text clipped - 51 lines]
> >
> >/BP
Helmut Weber - 21 Dec 2006 03:55 GMT
Hi BP,
>Yhe only ones of these I know how to search for are
>^p = paragraph mark
[quoted text clipped - 3 lines]
>^b = section break
>how do I find the others?
as to end-of-cell, end-of-row, not at all,
you can't search for them, as far as I know.
But don't worry, I think, I overdid it a bit
with mentioning them, too, being afraid of
having overlooked something.
If all of a cell is bold and you search for bold,
the end-of-cell is not encluded.
There is no font.normal property.
But there is range.font.reset,
which removes manual formatting.
Though, if a style is defined as bold
and text was manually unbolded,
it will be bold again.
FOr some more tipps on tagging,
google here for my decent name and "tagging".
HTH

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
BP - 22 Dec 2006 18:20 GMT
Hi Helmut,
> as to end-of-cell, end-of-row, not at all,
> you can't search for them, as far as I know.
[quoted text clipped - 4 lines]
> If all of a cell is bold and you search for bold,
> the end-of-cell is not encluded.
Ah OK. That may be good or bad. It so happens to be that I must find
some way of dealing with tables as well. Probably by hand-selecting
them and then run a macro which first turns the table into
tab-and-return-separated text and then inserts/replaces tabs and
returns with the appropriate tagging.
> There is no font.normal property.
> But there is range.font.reset,
> which removes manual formatting.
> Though, if a style is defined as bold
> and text was manually unbolded,
> it will be bold again.
Ah, OK. Then I'll have to use .Font.Bold = False, as I do have to deal
with heading styles defined as bold (and italic, and underline...)
> FOr some more tipps on tagging,
> google here for my decent name and "tagging".
Found them! I thought I was the only one in the world who'd want to do
something even akin to turning DOC format into wikitext. Good to see
it is not so! I wasn't aware of .InsertBefore and
.InsertAfter, but clearly they are better than using
"openingTag^&closing tag" as replacement text!
> HTH
Thanks a lot!
Helmut Weber - 22 Dec 2006 22:47 GMT
Hi BP,
actually, I don't know about wikitext.
My attempt was to convert Word-files
to txt-files tagged for QuarkXpress.
As Xpress AFAIK has not concept of tables,
Word-tables had to be converted to plain text.
Might be the same with wikitext.
Its a hell of a job.
One step is to find out the maximum number
of lines in a cell in a row.
Then add empty lines to every cell in that row,
which contains less than the maximum number of lines.
And taking care of end-of-line hyphens, too,
and convert it to ordinary hyphens and linefeeds.
The code I used is somewhere buried
in one of my office PCs.
Maybe some hundred lines.
But it's possible.
You could even convert a cross-word-puzzle
in form of a Word-table to plain text
and keep all of the information.
I wish you better luck than I had,
as nobody in our layout department for print
could understand what was going on.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"