Sub Main oSM = CreateObject("com.sun.star.ServiceManager") Dim oPropertyValue1 As New com.sun.star.beans.PropertyValue oPropertyValue1.Name = "Hidden" oPropertyValue1.Value = true oDoc = oSM.CreateInstance("com.sun.star.frame.Desktop").LoadComponentFromURL("private:factory/swriter","_blank",0,array(oPropertyValue1)) Dim oBorder As New com.sun.star.table.BorderLine oBorder.OuterLineWidth = 35 oText = oDoc.Text oCursor = oText.CreateTextCursor oTable = oDoc.createInstance("com.sun.star.text.TextTable") oTable.initialize(5,2) oText.InsertTextContent(oCursor,oTable,false) oTable.TableBorder = New com.sun.star.table.TableBorder oTable.TopMargin = 1000 oTable.GetCellRangeByPosition(0,0,1,0).BottomBorder = oBorder Dim oPropertyValue2 As New com.sun.star.beans.PropertyValue oPropertyValue2.Name = "FilterName" oPropertyValue2.Value = "writer_pdf_Export" oDoc.StoreToURL("file:///c:/testcase_vb.pdf",array(oPropertyValue2)) oDoc.Close(true) End Sub