View Single Post
 
Old 07-18-2019, 04:52 AM
sts023 sts023 is offline Windows 7 64bit Office 2010
Hopeless Idiot
 
Join Date: Apr 2019
Location: God's Own County
Posts: 26
sts023 is on a distinguished road
Default Identify current column on a page

In Word 2010 I have a landscape document which has three equal width columns on page 1, and 2 columns on page 2, the firsty being 1/3 of the width, the second being 2/3 of the width.
I have a variable (in terms of number of lines) amount of text in the first column of page 2, and I wish to insert three lines of text at the bottom of the first column on page 2, in a formatted box.
My plan was to identify how many lines are left in column 1 by inserting blank lines (vbLf) until the column number changes.
My problem is that the only references I can find to columns all seem to relate to tables, not to the current page.
Does anyone know how I can access the current page's current column number (if such a thing exists).
I've tried various "promising" methods, e.g.
Code:
'
' Code snippet
'
Dim grng                        As Word.Range
Dim intColNo                  As Integer
'

  Set grng = ActiveDocument.Content
  grng.Collapse Direction:=wdCollapseEnd
'The next line fails, telling me I'm not in a Table.
  intColNo = grng.Columns.Count
'The next line always returns -1.
  intColNo = grng.Information(wdEndOfRangeColumnNumber)
but I can't find one that works.
Can any kind soul help?
Reply With Quote