Added File extension parameter to Make Document

Support for DocX and correction of Import Word Doc file
Change button from Print to Report
Support opening a Library Document that does not have any usages.
This commit is contained in:
Rich
2015-10-27 13:32:33 +00:00
parent d452b2f5b3
commit e22458bd1a
3 changed files with 243 additions and 241 deletions

View File

@@ -272,20 +272,20 @@ namespace Volian.Controls.Library
private void InitializeWordDocument(LBDocumentClass doc)
{
if (MyDocumentInfo.Config == null || MyDocumentInfo.Config == "")
if (MyDocumentInfo.Config == null || MyDocumentInfo.Config == "" && MyDocumentInfo.DocumentEntryCount > 0)
{
DocStyle ds = MyDocumentInfo.DocumentEntries[0].MyContent.ContentItems[0].MyDocStyle;
// this will cause an error and goto the Catch if the family or size is null,
// Westinghouse needs it to to this - at least for now
//if (ds.Font.Family != null) doc.Application.Selection.Font.Name = ds.Font.Family;
//if (ds.Font.Size != null) doc.Application.Selection.Font.Size = (float)ds.Font.Size;
doc.Application.Selection.Font.Name = ds.Font.Family;
doc.Application.Selection.Font.Size = (float)ds.Font.Size;
doc.Application.Selection.ParagraphFormat.SpaceBefore = 0;
doc.Application.Selection.ParagraphFormat.SpaceAfter = 0;
doc.Application.Selection.ParagraphFormat.LineSpacingRule = LBWdLineSpacing.wdLineSpaceExactly;
doc.Application.Selection.ParagraphFormat.LineSpacing = 72 / 6; // for 6 LPI
MSWordToPDF.AdjustMargins(ds, doc, false);
DocStyle ds = MyDocumentInfo.DocumentEntries[0].MyContent.ContentItems[0].MyDocStyle;
// this will cause an error and goto the Catch if the family or size is null,
// Westinghouse needs it to to this - at least for now
//if (ds.Font.Family != null) doc.Application.Selection.Font.Name = ds.Font.Family;
//if (ds.Font.Size != null) doc.Application.Selection.Font.Size = (float)ds.Font.Size;
doc.Application.Selection.Font.Name = ds.Font.Family;
doc.Application.Selection.Font.Size = (float)ds.Font.Size;
doc.Application.Selection.ParagraphFormat.SpaceBefore = 0;
doc.Application.Selection.ParagraphFormat.SpaceAfter = 0;
doc.Application.Selection.ParagraphFormat.LineSpacingRule = LBWdLineSpacing.wdLineSpaceExactly;
doc.Application.Selection.ParagraphFormat.LineSpacing = 72 / 6; // for 6 LPI
MSWordToPDF.AdjustMargins(ds, doc, false);
}
if (doc.ActiveWindow.ActivePane.View.Zoom.Percentage < 40)
doc.ActiveWindow.ActivePane.View.Zoom.Percentage = 100;