public Word(string template = @"C:\Users\ReaLBERG\Desktop\3 курс\АИС\LB9\lb9tttt.doc") { wordapp = new word.Application(); wordapp.Visible = true; Object newTemplate = false; Object documentType = word.WdNewDocumentType.wdNewBlankDocument; Object visible = true; wordapp.Documents.Add(template, newTemplate, ref documentType, ref visible); worddocuments = wordapp.Documents; worddocument = worddocuments.get_Item(1); worddocument.Activate(); }
public COMFormatter(string template = @"D:\a2.doc") { wordapp.Visible = true; Object newTemplate = false; Object documentType = word.WdNewDocumentType.wdNewBlankDocument; Object visible = true; wordapp.Documents.Add(template, newTemplate, ref documentType, ref visible); worddocuments = wordapp.Documents; worddocument = worddocuments.get_Item(1); worddocument.Activate(); }
public WordReportTopBookOfGenre(string pathFrom) { path = pathFrom; wordapp = new word.Application(); wordapp.Visible = true; object newTemplate = false; object documentType = word.WdNewDocumentType.wdNewBlankDocument; object visible = true; wordapp.Documents.Add(path, newTemplate, ref documentType, ref visible); worddocuments = wordapp.Documents; worddocument = worddocuments.get_Item(1); //wordapp.Visible = false; worddocument.Activate(); }