PDA

View Full Version : how to get a Print dialog



Tod Brannen
19-Jan-2005, 09:34 AM
Greetings,
Without the news group online, things were piling up around here.Whew!
I have a small app that reads through a DF file and gets a document name
from each record and prints it using Word8.pkg. This is in VDF 8.3. The
user wants to select a printer other than their default printer just before
the printing begins. I can't get a printer dialog to come up and I used the
example in the Help. What am I missing?

Thanks

Tod Brannen

Tod Brannen
19-Jan-2005, 05:22 PM
Greetings,
The print dialog on the controls palette is for Crystal only and has all
types of warnings not to use it outside of Crystal. Has anyone successfully
made this work outside of Crystal??

Thanks,

Tod Brannen

Tod Brannen
20-Jan-2005, 09:24 AM
Someone must know how to do this?? Please don't tell me VDF can't handle
this.

Thanks in advance,

Tod Brannen

Erik Zimmerman
20-Jan-2005, 09:34 AM
Tod,

I'd be interested in this solution too.

Erik


"tbrannen" <tbrannen@ate.net> wrote in message
news:onK05Pj$EHA.3392@dacmail.dataaccess.com...
> Greetings,
> Without the news group online, things were piling up around here.Whew!
> I have a small app that reads through a DF file and gets a document name
> from each record and prints it using Word8.pkg. This is in VDF 8.3. The
> user wants to select a printer other than their default printer just
before
> the printing begins. I can't get a printer dialog to come up and I used
the
> example in the Help. What am I missing?
>
> Thanks
>
> Tod Brannen
>
>

David Martinko
20-Jan-2005, 09:39 AM
Tod,

I'll give you an answer I beleive to be true... but I don't know
everything so that it with a truckload of salt...

1) Yes, you can get a printer dialog to appear.
2) No, it does not change the default windows printer... only the
printer used within VDF.
3) Yes, I have changed the windows default printer before... however, it
is different for every operating system. I was able to change the windows
default printer by changing a registry value.

The printer dialog just creates all the Devmode settings you pass along
to the Crystal API which prints the acutal document. There is a print dialog
for the WinPrint also and I believe these are based on the exact same class.
So you can use either one. The Print Dialog should be on your toolbox beside
the Font and OpenAs. You said before that all or most all of your users are
on Win98 (I think). If that is the case, you may try the registry thing. On
VDF-Guidance, there is a pkg that you can use to determine the OS... or you
may have it already... It might be in the DAW pkgs too... But I am pretty
sure it's in the VDFQuery. Anyways, add a new printer that you don't really
have. Do a search in the RegEdit for that printer name. Note all places it's
found. Then, make it the default printer. Search RegEdit again. Now, if you
export that registry Key where you didn't find it before... and change back
to another printer as the default. Export that registry key. Now you can
play around changing your default printer by adding those registry keys back
in.

I would say you might be able to create a macro that activates the
printer dialog and prints... but macro's can be disabled. That may work too,
though.


HTH.

--
David Martinko
Redeemed Software
248-535-7495
RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com

"tbrannen" <tbrannen@ate.net> wrote in message
news:onK05Pj$EHA.3392@dacmail.dataaccess.com...
> Greetings,
> Without the news group online, things were piling up around here.Whew!
> I have a small app that reads through a DF file and gets a document name
> from each record and prints it using Word8.pkg. This is in VDF 8.3. The
> user wants to select a printer other than their default printer just
> before
> the printing begins. I can't get a printer dialog to come up and I used
> the
> example in the Help. What am I missing?
>
> Thanks
>
> Tod Brannen
>
>

Tod Brannen
20-Jan-2005, 03:23 PM
David,

Thanks for the detailed explanation, but I think I misled you on the
purpose of my needing the pirnt dialog.

I use the Word8.pkg and MSO97.pkg (FlexOle) to print these documents (that
is it tells Word to print them). I do NOT use Crystal or Winprint. I realize
I was not real clear about this. Sorry.

I do NOT need to set the default printer. I only want it to use the printer
I select for the current print job. But I think there is some kind of
problem with this.

Please tell me that this is now clear and there is a very simple and easy to
do it. (Please! )

Thanks,

Tod Brannen

David Martinko
20-Jan-2005, 03:59 PM
Tod,

As I understand, you are trying to set the printer for a print job of a
MSWord. I understand that you are NOT printing a winprint or crystal report.

From what I know, the print dialogs are not for use outside of a VDF
application. If you want to send me those 2 packages, I'll look them over to
see if I can see any way you can use the printer dialog...


--
David Martinko
Redeemed Software
248-535-7495
RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com

"tbrannen" <tbrannen@ate.net> wrote in message
news:zSU5l3y$EHA.1276@dacmail.dataaccess.com...
> David,
>
> Thanks for the detailed explanation, but I think I misled you on the
> purpose of my needing the pirnt dialog.
>
> I use the Word8.pkg and MSO97.pkg (FlexOle) to print these documents (that
> is it tells Word to print them). I do NOT use Crystal or Winprint. I
> realize
> I was not real clear about this. Sorry.
>
> I do NOT need to set the default printer. I only want it to use the
> printer
> I select for the current print job. But I think there is some kind of
> problem with this.
>
> Please tell me that this is now clear and there is a very simple and easy
> to
> do it. (Please! )
>
> Thanks,
>
> Tod Brannen
>
>

Erik Zimmerman
20-Jan-2005, 04:58 PM
Tod,

You can use a macro in MSWord to do this. Just create a macro in Word to
select the printer and print to it. I am using this methodology to build a
fax server and I need Word to print to a specific printer driver to create
images for the faxing from the original documents. Works great!

The VDF line is:

RunProgram background <YourFullPathToMSWord> <FileName.doc> /m<MacroName>

where /m is the switch and <MacroName> is the Macro in Word (no spaces
between the two).

Don't forget to embed quotes if the paths/filenames contain spaces.

HTH,

Erik
"tbrannen" <tbrannen@ate.net> wrote in message
news:zSU5l3y$EHA.1276@dacmail.dataaccess.com...
> David,
>
> Thanks for the detailed explanation, but I think I misled you on the
> purpose of my needing the pirnt dialog.
>
> I use the Word8.pkg and MSO97.pkg (FlexOle) to print these documents (that
> is it tells Word to print them). I do NOT use Crystal or Winprint. I
realize
> I was not real clear about this. Sorry.
>
> I do NOT need to set the default printer. I only want it to use the
printer
> I select for the current print job. But I think there is some kind of
> problem with this.
>
> Please tell me that this is now clear and there is a very simple and easy
to
> do it. (Please! )
>
> Thanks,
>
> Tod Brannen
>
>

David Martinko
20-Jan-2005, 05:03 PM
Unless the user disabled macros. Have you run into this?

--
David Martinko
Redeemed Software
248-535-7495
RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com

David Martinko
20-Jan-2005, 05:05 PM
Erik,

You can save printers to a specific document. If you have a copy of the Word
document which you can have saved printer as the fax... you can use your
same command and not need to macro. It would just print it to the fax.

--
David Martinko
Redeemed Software
248-535-7495
RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com

Erik Zimmerman
20-Jan-2005, 05:28 PM
Dave,

We're just getting this thing off the ground. But MS Word will sit on the
same machine as the VDF Fax server program in a closet somewhere so nobody
should touch it. Different doc each time so saving the printer to the doc
doesn't apply here (your next post).

Erik



"David Martinko" <RedeemedSoftware@Hotmail.com> wrote in message
news:YUcjvvz$EHA.4760@dacmail.dataaccess.com...
> Unless the user disabled macros. Have you run into this?
>
> --
> David Martinko
> Redeemed Software
> 248-535-7495
> RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com
>
>

Tod Brannen
24-Jan-2005, 01:09 PM
Erik,
See my reply to Oliver above in topic, "not so amazing print dialog'

Tod Brannen

"Erik Zimmerman" <erikz@compadmin.com> wrote in message
news:Pfv7l0v$EHA.612@dacmail.dataaccess.com...
> Tod,
>
> I'd be interested in this solution too.
>
> Erik
>
>
> "tbrannen" <tbrannen@ate.net> wrote in message
> news:onK05Pj$EHA.3392@dacmail.dataaccess.com...
> > Greetings,
> > Without the news group online, things were piling up around
here.Whew!
> > I have a small app that reads through a DF file and gets a document name
> > from each record and prints it using Word8.pkg. This is in VDF 8.3. The
> > user wants to select a printer other than their default printer just
> before
> > the printing begins. I can't get a printer dialog to come up and I used
> the
> > example in the Help. What am I missing?
> >
> > Thanks
> >
> > Tod Brannen
> >
> >
>
>