Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect New Page Added
Message
From
23/06/2003 04:23:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
22/06/2003 23:04:09
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00787560
Message ID:
00802808
Views:
21
>Thanks so much for your reply,
>
>I still have not won the fight to do my job. The problem is, I am filling the tables, (three rows, 2 columns-auto size) with information and they do a pagebreak if the current table does not fit entirely on a page (approx. 3 or 4 on a page).This is the behaviour I want. But on a new page, the table is place on the top with nothing above it. How can I get a paragraph above the table placeholder without knowing the table #. Or how can I manually insertbefore the table at the top of a page I word?
>
>I'am stuck!
>Thanks

Don't know the table# ? You should have something to keep your table's known, their number or a bookmark. Unfortunately table doesn't have a name property that you could use.

With a code like this your table already have a paragraph above it (or you could use SplitTable method) :
#include wdconst.h

Local oWord As 'Word.Application'
oWord = Createobject('Word.Application')
With oWord
  .Documents.Add
  With .ActiveDocument
    For ix = 1 To 10
      .Application.Selection.Collapse(wdCollapseEnd)
      .Tables.Add(.Application.Selection.Range,3,2)
      GetOutOfTable(oWord)
      .Application.Selection.InsertBreak(wdPageBreak)
    Endfor
  Endwith
  .Visible = .T.
  .Activate
Endwith


Function GetOutOfTable
  Lparameters toWord
  With toWord.Selection
    If .Information(wdWithInTable) && If we're in a table
      .MoveEnd(wdTable)
      .Collapse(wdCollapseEnd)	&& Get out of table
    Endif
  Endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform