Hi Helmut,
> Hi Harald,
>
[quoted text clipped - 3 lines]
> msgbox oTable.Borders.Enable
> results always in 0 ?
It is always -1 when started through the "Execute Sub/User Form"
button, which enables the border (quite strange, I always thought
1 would enable it, but it works, so I don't mess with it. In the
code I set "oTable.Borders.Enable = True", which should be usually
1 imho, but as sayed, it works. )
In the debug window, it looks like this:
[ oTable Object/Table ]
|
[ + Borders Borders/Borders]
|
[ + Enable -1 Long ]
msgbox oTable.Borders.Enable always results in "-1" when a table
is created (if executed out of vba) and "0" if started from the
application.
> And how does the code look from the application?
Sorry, I can't describe the code from the application. The macro which
creates the tables looks absolutely the same, but the application uses
dozens of other module files to output data from one application into a
Word document. The code for the tables is just used in one place in that
application and there are no other tables used, so I can't say if the
application code messes with tables. I think it could be a problem in one
of those module files, but I don't know what I should look after. I
mean, the table is already generated without borders, and they can't be
enabled. That's odd.
> Greetings from Bavaria, Germany
> Helmut Weber, MVP
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
Greetings to Bavaria form Bavaria ;)
Helmut Weber - 22 Apr 2005 07:29 GMT
Hi Harald,
as far as I know and remember,
"true" is not the same or at least wasn't
the same in all programming languages.
Some years ago I was puzzled, too,
to find out that in VB and VBA "true"
was -1, instead of 1, as I was used to.
If you control word from another language,
border.enable is set to the value, which
that language uses for "true".
Therefore my examples did'nt use "true" at all.
Try border.enable = -1, not
border.enable = true.
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
Harald Mueller - 26 Apr 2005 12:52 GMT
Hi Helmut,
I tried that before and it didn't work either,
but I found a workaround of this problem.
We added a new style with borders and we use it it output
the table text, and it works as it should. That's good enough
for us.
Thanks for your help!
Greetings,
Harald
> Hi Harald,
>
[quoted text clipped - 16 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000