' This code creates an RTF document in the next to last line. This requires ' that Word is installed. Is there a different way that requires only Wordpad ' because it is usually present when office is not installed? ' Create document. WordApp = CreateObject("Word.Application") If WordApp.Visible = True Then WordApp.Visible = False WordApp.Assistant.Visible = False thisDoc = WordApp.Documents.Add thisDoc.PageSetup.PaperSize = Microsoft.Office.Interop.Word.WdPaperSize.wdPaperLetter thisDoc.PageSetup.TopMargin = 0 thisDoc.PageSetup.BottomMargin = 0 thisDoc.PageSetup.HeaderDistance = 0 thisDoc.PageSetup.FooterDistance = 0 thisDoc.PageSetup.LeftMargin = 72 thisDoc.PageSetup.RightMargin = 72 thisDoc.Range.InsertBefore(currentName) thisRange = thisDoc.Paragraphs.Item(1).Range thisRange.Font.Name = "Segoe UI Semibold" thisRange.Font.Bold = True thisRange.Font.Size = 14 thisRange.ParagraphFormat.Alignment _ = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphLeft ' Save document. frmSrv1.Text = "Saving document..." TopicFileName = topicDir & "\" & srvFilesFldN & "\" & progID & thisAppID & topicN & "." & srvExt thisDoc.SaveAs(TopicFileName, RichTextBoxStreamType.RichText) thisDoc.Close
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)