Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2004

Tip: Looking for answers? Try searching our database.

C#  Word automation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Weston Weems - 27 Oct 2004 18:08 GMT
Hello...

I've seen about 10 ways to do this, and for whatever
reason I cant insert page breaks or linebreaks (or rather
I can, but they dont appear to happen in the resulting
document.

I get a reference to the endofdocument bookmark range

then I can create a paragraph based on that, and do

oPara.Range.InsertAfter("Hello world"); //which works fine

But if I add a reference to wdPageBreak and then do
oPara.Range.InsertBreak(ref oPageBreak); it does nothing.

Ultimate result I am shooting for
Find end of document, insert page, or insert page break to
get a new page.. insert some manual data there, then
insert another pagebreak... effectively adding 1page.

Thanks for any advice...
Weston
Weston Weems - 27 Oct 2004 18:45 GMT
I found that I was trying to stick a pagebreak in a
paragraph which i dont think is supposed to work. So I
went ahead and stuck it in EndDocument range, and it did
infact create a pagebreak, but what I found is that the
order in which I was spitting data out to the document is
completely inverted.

...InsertAfter("Second Item");
...InsertAfter("First Item");

To get the items to display properly.

Has *ANYONE* seen this strange behaviour?

>-----Original Message-----
>Hello...
[quoted text clipped - 21 lines]
>Weston
>.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.