Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word how to add new page
Message
From
04/09/2003 11:30:51
 
 
To
04/09/2003 11:05:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00826005
Message ID:
00826058
Views:
23
Cetin,

I ran it thru a program an worked perfectly,

somehow thru the command window it wasn't [maybe I was doing something differently] anyway thanks a lot that's what I needed.

Have a good one,

Yanick

>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
Previous
Reply
Map
View

Click here to load this message in the networking platform