Hey all,
I am not sure if this has been asked before, so i am asking again.
The intention to read an xml file and create a MSWord file with
appropriate pieces of data with different formattings. I wrote the whole
program and for debugging purposes, i set the visibility of the word
object to be true. Once the functionality was in place i set the
visibility to false and the formatting stated going haywire. The only
way formatting works correctly is when i set the visibility to true. Any
pointer as to what am i doing wrong ?
I am using wordbasic (word 95) commands and instead of adding a
reference to MSWord i am using CreateObject (i hope that would make it
work for different versions of MSWord and i wont have to bundle the dll).


-j

Re: WordObject visibility issue by Word

Word
Fri Dec 12 15:47:16 CST 2003

G'day "jvirdi@softhome.net" <jvirdi@softhome.net>,

Just a known sid effect of visible=false unfortunately.

I avoid visible=false for two reasons.

One you have discovered - formatting don't work properly

Two: Any macro sufficiently slow enough to warrant the slight
performance increase of being invisible should really be providing the
user with a progress bar to demonstrate the system hasn't hung. Thus
application.screenupdating=false and throw up a progress bar instead.


"jvirdi@softhome.net" <jvirdi@softhome.net> was spinning this yarn:

>Hey all,
> I am not sure if this has been asked before, so i am asking again.
>The intention to read an xml file and create a MSWord file with
>appropriate pieces of data with different formattings. I wrote the whole
>program and for debugging purposes, i set the visibility of the word
>object to be true. Once the functionality was in place i set the
>visibility to false and the formatting stated going haywire. The only
>way formatting works correctly is when i set the visibility to true. Any
> pointer as to what am i doing wrong ?
> I am using wordbasic (word 95) commands and instead of adding a
>reference to MSWord i am using CreateObject (i hope that would make it
>work for different versions of MSWord and i wont have to bundle the dll).
>
>
>-j

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

If my answers r 2 terse, ask again or hassle an MVP,
at least they get recognition for it then.
Lengthy replies offlist require payment.

Re: WordObject visibility issue by Jezebel

Jezebel
Fri Dec 12 15:56:45 CST 2003

Working with Word invisible should work fine provided you work exclusively
with Range objects (not the Selection) and you avoid referring to any of
Word's GUI objects (like Window, Pane, etc). Some of the Information()
functions also behave differently.


<jvirdi@softhome.net> wrote in message
news:OYiGRTKwDHA.2316@TK2MSFTNGP10.phx.gbl...
> Hey all,
> I am not sure if this has been asked before, so i am asking again.
> The intention to read an xml file and create a MSWord file with
> appropriate pieces of data with different formattings. I wrote the whole
> program and for debugging purposes, i set the visibility of the word
> object to be true. Once the functionality was in place i set the
> visibility to false and the formatting stated going haywire. The only
> way formatting works correctly is when i set the visibility to true. Any
> pointer as to what am i doing wrong ?
> I am using wordbasic (word 95) commands and instead of adding a
> reference to MSWord i am using CreateObject (i hope that would make it
> work for different versions of MSWord and i wont have to bundle the dll).
>
>
> -j
>



Re: WordObject visibility issue by Word

Word
Sat Dec 13 06:18:27 CST 2003

G'day "Jezebel" <grocer@play.net>,

<shrugs>

Completely disagree from personal experience.


"Jezebel" <grocer@play.net> was spinning this yarn:

>Working with Word invisible should work fine provided you work exclusively
>with Range objects (not the Selection) and you avoid referring to any of
>Word's GUI objects (like Window, Pane, etc). Some of the Information()
>functions also behave differently.
>
>
><jvirdi@softhome.net> wrote in message
>news:OYiGRTKwDHA.2316@TK2MSFTNGP10.phx.gbl...
>> Hey all,
>> I am not sure if this has been asked before, so i am asking again.
>> The intention to read an xml file and create a MSWord file with
>> appropriate pieces of data with different formattings. I wrote the whole
>> program and for debugging purposes, i set the visibility of the word
>> object to be true. Once the functionality was in place i set the
>> visibility to false and the formatting stated going haywire. The only
>> way formatting works correctly is when i set the visibility to true. Any
>> pointer as to what am i doing wrong ?
>> I am using wordbasic (word 95) commands and instead of adding a
>> reference to MSWord i am using CreateObject (i hope that would make it
>> work for different versions of MSWord and i wont have to bundle the dll).
>>
>>
>> -j
>>
>

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

If my answers r 2 terse, ask again or hassle an MVP,
at least they get recognition for it then.
Lengthy replies offlist require payment.