K
Keith G Hicks
I am converting an MS Access app that I wrote sevearl years ago for a client
over to ASP. There's a feature in the app that I am not sure how to do in
ASP and need some input on.
They need to know the height in inches of a block of text formatted a
certain way for determining layout in a newspaper. The block of text will
vary in content and lenght from record to record so here's what I did in
Access: I open up an invisible instance of MS Word on the client machine,
set the margins, font, etc., paste the text in and using some unusal word
doc properties I can figure out the height in inches. It's worked well for
quite some time.
I know from some of my recent research that it's a bad idea to try to
automate Word on the server for many clients. Everyone says it's a big mess
to deal with and Microsoft advises against it. So I'm tryign to figure out
the best way to handle this. It occurred to me taht I could put a hidden
table (1 row by 1 column) on a page, set the width, font, etc, in design and
then in code, paste the text in. I noticed that the cell stretches in height
to fit the text. Seems like I could get the hieght after all that occurs.
I'm worndering if this is a good solution or not and if not, what other
solutions might be sensible.
Any help would be greatly appreciated.
Thanks,
Keith
over to ASP. There's a feature in the app that I am not sure how to do in
ASP and need some input on.
They need to know the height in inches of a block of text formatted a
certain way for determining layout in a newspaper. The block of text will
vary in content and lenght from record to record so here's what I did in
Access: I open up an invisible instance of MS Word on the client machine,
set the margins, font, etc., paste the text in and using some unusal word
doc properties I can figure out the height in inches. It's worked well for
quite some time.
I know from some of my recent research that it's a bad idea to try to
automate Word on the server for many clients. Everyone says it's a big mess
to deal with and Microsoft advises against it. So I'm tryign to figure out
the best way to handle this. It occurred to me taht I could put a hidden
table (1 row by 1 column) on a page, set the width, font, etc, in design and
then in code, paste the text in. I noticed that the cell stretches in height
to fit the text. Seems like I could get the hieght after all that occurs.
I'm worndering if this is a good solution or not and if not, what other
solutions might be sensible.
Any help would be greatly appreciated.
Thanks,
Keith