Dim word As New C1WordDocument()
' use landscape for more impact
word.Landscape = True
' measure and show some text
Dim text = "Hello!! This is a sample text."
Dim font = New Font("Segoe UI Light", 20, RtfFontStyle.Italic)
' add paragraph
word.AddParagraph(text, font, Colors.BlueViolet, RtfHorizontalAlignment.Justify)
Dim picker As New FileSavePicker()
picker.FileTypeChoices.Add("Word Open XML Format (.docx)", New List(Of String)() From { _
".docx" _
})
picker.FileTypeChoices.Add("RTF Format (.rtf)", New List(Of String)() From { _
".rtf" _
})
picker.DefaultFileExtension = ".docx"
picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary
Dim file As StorageFile = Await picker.PickSaveFileAsync()
If file IsNot Nothing Then
Await word.SaveAsync(file, If(file.Name.ToLower().EndsWith(".docx"), FileFormat.OpenXml, FileFormat.Rtf))
Dim dlg As New MessageDialog("File saved")
Await dlg.ShowAsync()
End If