Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word how to add new page
Message
De
04/09/2003 11:05:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00826005
Message ID:
00826045
Vues:
38
Yanick,
Though my code style is not like yours I just tested it with your code adding :

oRange.InsertBreak()
oWord.Visible = .t.

at the end. I don't see page 1 as empty. What I see is :

(Page1)Fake Text...
-Page break-
(Page2)

Cetin

>Cetin,
>
>the piece of code you provided actually inserts a page before the page we are sitting on, that is, text on page 1 becomes page 2 and page 1 [after your command] becomes blank thus having a 2 page document with page 1 being blank and text on page 2.
>
>As opposed to the behavior I'm looking for, that is, text on page 1 remains there and page inserted becomes page 2 and is blank thus having a 2 page document with text on page 1 and page 2 being blank.
>
>Thanks,
>
>Yanick
>
>>Sorry I don't understand the difference from [Ctrl+Enter] behaviour.
>>Cetin
>>
>>>Thanks Cetin,
>>>
>>>that's almost it...
>>>
>>>
>>>oRange.InsertBreak() && Default is page break
>>>
>>>
>>>IT inserts a pagebreak that is thru but I actually need it to be appended... I need the exact same behavior than [CTRL+ENTER] that is having the new page inserted after the end of the document.
>>>
>>>TIA
>>>
>>>Yanick
>>>
>>>>>Hi again,
>>>>>
>>>>>I need to add a new page to an existing Word Document.
>>>>>
>>>>>
>>>>>#DEFINE wdCollapseEnd  0
>>>>>
>>>>>oWord = CREATEOBJ("Word.Application")
>>>>>oDoc = oWord.documents.Add()
>>>>>oRange = oDoc.range()
>>>>>oRange.InsertAfter("Fake text...")
>>>>>oRange.Collapse( wdCollapseEnd )
>>>>>
>>>>>
>>>>>from here what I'd like to happen is to add a page as if the user would have keyed and continue to put text on the page that have just been created.
>>>>>
>>>>>TIA for your help,
>>>>>
>>>>>
>>>>>Yanick
>>>>
>>>>oRange.InsertBreak() && Default is page break
>>>>
>>>>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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform