Dim word As New C1WordDocument()
' 横方向を使用して効果を高めます
word.Landscape = True
' テキストを測定および表示します
Dim text = "こんにちは!! これはサンプルテキストです。"
Dim font = New Font("Segoe UI Light", 20, RtfFontStyle.Italic)
' 段落を追加します
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("ファイルを保存しました")
Await dlg.ShowAsync()
End If