If column formatting changes in the middle of a page, there is also a
new section at that point. In other words, make sure that n refers to
the correct section!
A different approach, which may or may not be wise (depending on what
you are trying to accomplish) is to refer to the first section of the
current selection:
x = Selection.Sections(1).PageSetup.TextColumns.Count
ActiveDocument.PageSetup.TextColumns.Count would return 9999999
(wdUndefined) unless all sections have the same number of columns.
--
Stefan Blom
Microsoft Word MVP
in message
How?
The code
ActiveDocument.Sections(n).PageSetup.TextColumns.Count
is not working
the code
ActiveDocument.PageSetup.TextColumns.Count
is working only on columns which start from begining of page. But if columns
start from in between then this code is not working.
So please give me proper code.
Thanks