WD2000: Cannot Turn Off "Allow Spacing Between Cells" Option When Using Macro (276379)



The information in this article applies to:

  • Microsoft Word 2000

This article was previously published under Q276379

SYMPTOMS

When you attempt to turn off the Allow spacing between cells option for a Word table in a Visual Basic for Applications macro by using the Spacing property, the option is not turned off.

CAUSE

This problem occurs because the Spacing property does not allow for the disabling of the Allow spacing between cells option. The Spacing property returns or sets the spacing between the cells in a table, in points.

WORKAROUND

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base:

212536 OFF2000: How to Run Sample Code from Knowledge Base Articles

To turn off the Allow spacing between cells option in your Word table in a Visual Basic for Applications macro, use the SendKeys command, as in the following macro example:
Sub RemoveCellSpacing()

   Selection.Tables(1).Select

   With Selection.Tables(1)
      SendKeys "%s{Enter}"
      Dialogs(1080).Show
   End With

End Sub
				

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

For more information about the Spacing property, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type spacing property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbbug kbdtacode kbmacroexample kbnofix KB276379