2

I'm using the following code to create a word document from my c# application:

oWord = new Word.Application();
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
oDoc.PageSetup.PaperSize = WdPaperSize.wdPaperLegal;

Is there a way I can specify (using c# code) the printing option

Zoom > "Scale to paper Size"

to be A4 whenever this document is printed?

Thanks in advance!

Themos
  • 430
  • 1
  • 9
  • 18

1 Answers1

2

You can set the options when printing the document: in the PrintOut method, specify these values:

PrintZoomPaperWidth = 11907
PrintZoomPaperHeight = 16839
stuartd
  • 70,509
  • 14
  • 132
  • 163
  • Is there no way I can change the zoom setting for the specific document without manually initiating a printout? I just want the zoom setting to be set to A4 whenever the user decides to print it. – Themos Sep 04 '12 at 11:21
  • @Themos not by the look of it. You could provide a Print button on the document that calls a macro which sets these values, but that has it's own problems with macro security etc. – stuartd Sep 04 '12 at 11:32