private static void SetPrintOptions(MSOInterop.PowerPoint._Presentation pptFile) { pptFile.PrintOptions.ActivePrinter = "Microsoft XPS Document Writer"; pptFile.PrintOptions.OutputType = MSOInterop.PowerPoint.PpPrintOutputType.ppPrintOutputNotesPages; pptFile.PrintOptions.PrintColorType = MSOInterop.PowerPoint.PpPrintColorType.ppPrintColor; pptFile.PrintOptions.HighQuality = MSOCore.MsoTriState.msoFalse; // msoTrue = -1 | msoFalse = 0 pptFile.PrintOptions.PrintHiddenSlides = MSOCore.MsoTriState.msoTrue; pptFile.PrintOptions.PrintInBackground = MSOCore.MsoTriState.msoFalse; // Wait for print to finish. }
private static void DeleteIfExists(MSOInterop.PowerPoint._Presentation pptFile) { string xpsPath = pptFile.FullName.Replace(".pptx", ".xps"); if (File.Exists(xpsPath)) { Console.WriteLine($"Deleting existing file ..."); File.Delete(xpsPath); } }
/// <summary> /// Контруктор для класса /// </summary> /// <param name="parTable">Таблица для обработки</param> public TableProcessor(Interpop.Word.Table parTable) { this.table = parTable; ProcessingTable(); }
private int GetSelfHours(Interpop.Word.Cell hourCell) { hourCell = hourCell.Next; hourCell = hourCell.Next; hourCell = hourCell.Next; String result = Regex.Match(hourCell.Next.Range.Text.ToLower(), @"\d+").Value; return int.Parse(result); }