WordObject visibility issue

J

jvirdi

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
 
W

Word Heretic

G'day "(e-mail address removed)" <[email protected]>,

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.


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.
 
J

Jezebel

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.
 
W

Word Heretic

G'day "Jezebel" <[email protected]>,

<shrugs>

Completely disagree from personal experience.


Jezebel said:
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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top