Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detect New Page Added
Message
De
23/06/2003 04:23:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/06/2003 23:04:09
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00787560
Message ID:
00802808
Vues:
22
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform