Could the author be wrong?

  • Thread starter Thread starter Just Me
  • Start date Start date
J

Just Me

I found the following in a book:

With PageSetupdialog1
.PageSettings=PD1.DefaultPageSettings
if .ShowDialog() = DialogResultOK then _
PD1.DefaultPageSettings= .PageSettings
end with

Seems to me that PageSetupDialog1.PageSettings
and PD1.DefaultPageSettings reference the same object
so the statement
PD1.DefaultPageSettings = .PageSettings
is not needed.

No big deal here except it may point to a misunderstanding on my part.

Can you confirm that it is not needed or tell me why it is?

Thank
 
Just Me said:
With PageSetupdialog1
.PageSettings=PD1.DefaultPageSettings
if .ShowDialog() = DialogResultOK then _
PD1.DefaultPageSettings= .PageSettings
end with

Seems to me that PageSetupDialog1.PageSettings
and PD1.DefaultPageSettings reference the same object
so the statement
PD1.DefaultPageSettings = .PageSettings
is not needed.

'DefaultPageSettings' gets or sets page settings that are used as defaults
for all pages to be printed. These settings can be changed in
'PageSetupdialog1'. If the page setup dialog doesn't create a new
'PageSettings' object it's not necessary to assign it to the document's
'DefaultPageSettings' property.
 
'DefaultPageSettings' gets or sets page settings that are used as defaults
for all pages to be printed.

Thanks,
That is what PD.DefaultPageSettings is used for.

I haven't been able, by reading Help, to determine what
PD.PrinterSettings.DefaultPageSettings

is used for!



Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top