table->movedown

D

Dinçer

Hi everyone!

My program creates a report (Word document) which includes several tables.
Unfortunately, today, I found out that Microsoft has a bug when using
MoveDown method.

(http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com
:80/support/kb/articles/q235/8/76.asp&NoWebContent=1)

The article says the bug doesn't appear if we make the document visible
before using MoveDown method. Indeen, it doesn't.
However, it is not a good thing to show the user all the creation process of
the report.
How can I skip this error and create my reports?

Thank you...

PS:
This line of code is the reason of the problem:
objDoc.ActiveWindow.Selection.MoveDown Unit:=wdLine, Count:=1

What can I do instead of this code, to be able to finish a table and after
putting a few newline's go to the other table?
 
D

Dinçer

I tried this:
I made the document visible before each MoveDown usage, and then I made the
document back invisible.
When run in visible mod, MoveDown works OK.
But, for each table the screen kinda blinks you. And of course, I don't want
this..
Are there any other solution ??
 
K

Klaus Linke

Hi Dinçer,

There are lots of methods to move the Selection. It should be easy to avoid
"MoveDown".

If you want the cursor to end up in the paragraph following the table, you
could use
Selection.Tables(1).Select
Selection.Collapse Direction:=wdCollapseEnd

If you want to move the selection to the start of the next row, use
Selection.Move Unit:=wdRow, Count:=1
This wouldn't move the selection if it is in the last row of the table.

Greetings,
Klaus
 

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