Crazy property values

A

Andy M

When running VBA code in a Word document, I'm getting a
value of 9999999 for a couple of properties, such as
ActiveDocument.PageSetup.LeftMargin and
ActiveDocument.Tables(2).Range.Rows(rw).Cells(c).Width.

Although I'm only calling the margin property once (and
getting the error), the width property applies to hundreds
of cells in several tables, but only occasionally comes
back as 9999999.

This is always with merged cells, which is what I'm trying
to get rid of at this part of the procedure, though not
all of the merged cells give the error.

Any suggestions anyone?

Thanks
 
H

Helmut Weber

Hi Andy,
you will get 9999999 if the value in undefined or
if there are several answers to your question,
that is if document section(1) has a different
left margin from section(2). The same applies to cells.
Unless you have detected another bug ;-)
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, Win 98
 

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