I am using VB6 to poke data into Word 2002.

Even when I open Word minimized, it maximizes when the poke executes.

I can can execute a word macro to minimize word again, but it maximizes on the next poke.

I have tried turning word screen updating off before the poke but that does not help.

I used this exact code with VB3 and Word 7 and Word stayed minimized. Any ides how to make word 2002 behave?

There is an option that allows you to turn off the visibility, so the application (word) will not show up at all. Why don't you turn it off, execute your commands and then turn it back on.

regards

Good thought, but it didn't work.

I created a word macro that set application.visible = false and I executed that macro through a linkexecute.

The document still became visible with a linkpoke

When I called my iinvisible macro with each linkpoke it made the screen flash. It also caused some other word macros to fail (looking for the active document or active window when word was not visible)

I hate to give up fun little tricks like this.... but I suggest that you use the API to change the parent of the word window, to a form in your project. Then, simply ensure that your form is not visible.... you can decide to give the parent the child back after the poke should you want to, but it's hardly necessary.... so long as you keep your form the parent of the window, the dde should not affect it's behavior.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.