Hello,
At one point code below use to draw line and show it as required in MSWord. But it seems code below is missing something and not able to draw line now. Can you please help to get line draw on the document object.
I am creating lobjLineDoc object, use same to draw line and append it later to main object where I combine all the data with line as a seperator. Please let me know if there is any workaround to get this line working back.
Thanks,
Vinay Hattarki
Dim lobjLineDoc As New Aspose.Words.Document
Dim lobjDocBuilder As Aspose.Words.DocumentBuilder = New DocumentBuilder(lobjLineDoc)
Dim lWidth As Double = lobjDocBuilder.CurrentSection.PageSetup.PageWidth
Dim lLine As New Aspose.Words.Drawing.Shape(lobjLineDoc, Drawing.ShapeType.Line)
lLine.Width = lWidth / 2
lLine.HorizontalAlignment = Drawing.HorizontalAlignment.Center
lLine.StrokeColor = Color.Black
lLine.Stroke.LineStyle = Drawing.ShapeLineStyle.Single
lLine.StrokeWeight = 1
'lobjDocBuilder.CurrentSection.PageSetup.SectionStart = SectionStart.Continuous
lobjDocBuilder.InsertNode(lLine)
lobjLineDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous
lobjLineDoc.FirstSection.PageSetup.PaperSize = Aspose.Words.PaperSize.Legal
mobjMainAsposeDoc.AppendDocument(lobjLineDoc, ImportFormatMode.UseDestinationStyles)
lobjLineDoc.Save("C:\myline111.doc")
'** Temp Single Iteration Doc to get Page Count
mObjPageCountDoc.AppendDocument(lobjLineDoc, ImportFormatMode.UseDestinationStyles)