How create cover page

Hi ,

I have downloaded latest evaluation Aspose.Words .Net i.e. 13.1

I wan to create one cover-page document (See Attachment)

In that one background image is fixed as it in attached document , and company log is also fixed

other Title ,Text ,Company name ,Date gets changed each time.

below that more pages will get added according to as data is present.

for cover page (First page) LeftMargin is 1.25’’ and RightMargin is 0’‘

and rest of all the pages Left and Right Margin is 1.25’’

I am using Vb.net please help me to get it done

and also tell me how to create cover page using MSWord 2007

if cover page problematically possible then it is well N good

output doc file should be in 97-2003 format.

Regards ,
Jeevan joshi.

Hi Jeevan,

Thanks for your inquiry.

Sure, using the Shape class you can create or modify shapes in a Microsoft Word document. A Shape represents an object in the drawing layer, such as an AutoShape, textbox, freeform, OLE object, ActiveX control, or picture. You can place a floating Shape anywahere inside the page. For example, the following code layout an image at the centre of first page:

Dim doc As New Document()
Dim builder As New DocumentBuilder(doc)
Dim shape As Shape = builder.InsertImage("C:\Temp\Aspose Logo.png")
shape.WrapType = WrapType.None
shape.BehindText = True
shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Page
shape.HorizontalAlignment = Aspose.Words.Drawing.HorizontalAlignment.Center
shape.RelativeVerticalPosition = RelativeVerticalPosition.Page
shape.VerticalAlignment = VerticalAlignment.Center
doc.Save("c:\temp\out.docx")

Similarly, you can use the following code snippet to insert a TextBox Shape in your document:

Dim doc As New Document()
Dim textBox As New Shape(doc, ShapeType.TextBox)
textBox.WrapType = WrapType.None
textBox.HorizontalAlignment = Aspose.Words.Drawing.HorizontalAlignment.Center
textBox.VerticalAlignment = VerticalAlignment.Top
textBox.Height = 50
textBox.Width = 200
textBox.ZOrder = 2
textBox.AppendChild(New Paragraph(doc))
Dim para As Paragraph = textBox.FirstParagraph
para.ParagraphFormat.Alignment = ParagraphAlignment.Center
Dim run As New Run(doc)
run.Text = "Content in textbox"
para.AppendChild(run)
doc.FirstSection.Body.FirstParagraph.AppendChild(textBox)
doc.Save("C:\Temp\out.docx")

You should also not that there is no page concept in Microsoft Word documents; pages are created by Microsoft Word on the fly. In your case, to be able to keep different margin settings for the first page to those specified for the rest of the pages in your document, you need to add two Sections in your document such that the first Section contains the content of your first page and the second Section contains the content for the remaining pages. You can then use Section.PageSetup class to set margins as follows:

Dim doc As New Document()
Dim firstPageSetup As PageSetup = doc.FirstSection.PageSetup
Dim otherPagesSetup As PageSetup = doc.LastSection.PageSetup
firstPageSetup.LeftMargin = ConvertUtil.InchToPoint(1.25)
firstPageSetup.RightMargin = 0
otherPagesSetup.LeftMargin = ConvertUtil.InchToPoint(1.25)
otherPagesSetup.RightMargin = ConvertUtil.InchToPoint(1.25)

Moreover, to be able to insert dynamic data into your document, I would suggest you visit the following link to learn about the Mail Merge capabilities of Aspose.Words:
https://docs.aspose.com/words/net/mail-merge-and-reporting/

If we can help you with anything else, please feel free to ask.

Best regards,

Hi Awais ,

Thanks that solved my problem.

Regards ,

Jeevan Joshi

Hi Jeevan,

Thanks for your feedback. Please let us know any time you have any further queries.

Best regards,