Click here to Skip to main content
15,895,011 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questiongetting sections in different page is word file Pin
Dhyanga29-Jul-10 8:45
Dhyanga29-Jul-10 8:45 
AnswerRe: getting sections in different page is word file Pin
Yusuf29-Jul-10 8:54
Yusuf29-Jul-10 8:54 
GeneralRe: getting sections in different page is word file Pin
Dhyanga29-Jul-10 9:09
Dhyanga29-Jul-10 9:09 
GeneralRe: getting sections in different page is word file Pin
David Mujica29-Jul-10 10:18
David Mujica29-Jul-10 10:18 
GeneralRe: getting sections in different page is word file Pin
Dhyanga29-Jul-10 10:36
Dhyanga29-Jul-10 10:36 
GeneralRe: getting sections in different page is word file Pin
David Mujica29-Jul-10 10:48
David Mujica29-Jul-10 10:48 
GeneralRe: getting sections in different page is word file Pin
Dhyanga2-Aug-10 5:10
Dhyanga2-Aug-10 5:10 
GeneralRe: getting sections in different page is word file Pin
David Mujica2-Aug-10 10:33
David Mujica2-Aug-10 10:33 
Here is a code snipet of how to insert Page Breaks in your MS-Word document as you build it from your dataset ...
Dim oWordApp As New Word.Application
Dim oWordDoc As Word.Document
Dim oPara1 As Word.Paragraph

oWordApp.Visible = True
oWordDoc = oWordApp.Documents.Add()


oWordDoc.Activate()

oPara1 = oWordDoc.Content.Paragraphs.Add
oPara1.Range.Text = "Grouping 1"
oPara1.Range.InsertParagraphAfter()

oPara1 = oWordDoc.Content.Paragraphs.Add
oPara1.Range.Text = Chr(12) + "Grouping 2"		' Notice the chr(12) is appended before the title of the second group
oPara1.Range.InsertParagraphAfter()

'oWordDoc.SaveAs("C:\Page Break Test.doc")

oWordDoc.PrintPreview()

MsgBox("Close the word document now.")

oWordDoc.Close()

oWordApp.Quit()

oWordDoc = Nothing
oWordApp = Nothing


Try inserting the Chr(12) into your code whenever your grouping changes and you should see the page breaks appear. Cool | :cool:

Good luck.
GeneralRe: getting sections in different page is word file Pin
Dhyanga3-Aug-10 3:51
Dhyanga3-Aug-10 3:51 
Questionparameter in asp.net Pin
Dhyanga29-Jul-10 5:44
Dhyanga29-Jul-10 5:44 
AnswerRe: parameter in asp.net Pin
Eddy Vluggen29-Jul-10 5:52
professionalEddy Vluggen29-Jul-10 5:52 
GeneralRe: parameter in asp.net Pin
Dhyanga29-Jul-10 6:07
Dhyanga29-Jul-10 6:07 
Questionvalidation in javascript Pin
Thanusree Duth29-Jul-10 1:29
Thanusree Duth29-Jul-10 1:29 
AnswerRe: validation in javascript Pin
Keith Barrow29-Jul-10 2:28
professionalKeith Barrow29-Jul-10 2:28 
AnswerRe: validation in javascript Pin
Not Active29-Jul-10 2:30
mentorNot Active29-Jul-10 2:30 
GeneralRe: validation in javascript Pin
Keith Barrow29-Jul-10 2:48
professionalKeith Barrow29-Jul-10 2:48 
QuestionMessage Removed Pin
28-Jul-10 23:42
NTheOne28-Jul-10 23:42 
AnswerRe: Title of the WIndow Using Javascript in Code Behind Pin
Tej Aj28-Jul-10 23:58
Tej Aj28-Jul-10 23:58 
QuestionContentplaceholder on masterpage Pin
C#Coudou28-Jul-10 22:14
C#Coudou28-Jul-10 22:14 
AnswerRe: Contentplaceholder on masterpage Pin
raju melveetilpurayil28-Jul-10 22:54
professionalraju melveetilpurayil28-Jul-10 22:54 
GeneralRe: Contentplaceholder on masterpage Pin
C#Coudou28-Jul-10 23:23
C#Coudou28-Jul-10 23:23 
GeneralRe: Contentplaceholder on masterpage Pin
raju melveetilpurayil28-Jul-10 23:56
professionalraju melveetilpurayil28-Jul-10 23:56 
Questionquery string Pin
Thanusree Duth28-Jul-10 21:48
Thanusree Duth28-Jul-10 21:48 
AnswerRe: query string Pin
Blue_Boy28-Jul-10 21:50
Blue_Boy28-Jul-10 21:50 
AnswerRe: query string Pin
Tej Aj28-Jul-10 23:24
Tej Aj28-Jul-10 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.