How to use Office Viewer(Only View not Edit funciton) to print a f

R

Ricmy_zhu

Hello !
I want to use office Viewer pint file by command line or VBA in my program
without any UI , but I can't found any way to perform this ,please help me !

thanks!

Ricmy
 
C

Cindy Meister

You really don't provide propert information; it's not clear exactly what
you're after. But if I'm interpreting this correctly, the answer is: you
can't.

The Microsoft "Viewers" for the various Office applications have NO command
line switches or automation interface. There's no way to use one to have a
file print out without displaying the actual viewer. Possibly, using Shell
and Sendkeys, you could open the viewer with a file and get it to print. But
the Viewer would be visible.

-- Cindy
 
R

Ricmy_zhu

Dear Cindy:

thank your information !
Actually , I want print a office file in my program .but I don't want let
user know I use the office viewer to print. so i want don't show any windows
or dialog when my print files.

if we use shell to open Viewer ,whether can hide the Viewer UI or minimum
Viewer?

best regards,

Ricmy
 
C

Cindy Meister

I have no idea if the Viewer would function in this mode. In any case, it
would probably have to be done using the WindowsAPI to control the window. I
can't give you any help with that.

-- Cindy
 
R

Ricmy_zhu

Dear Cindy:

thank you very much ,
can you tell me how to use shell to cortrol this viewer ,such as open , view
file ,print ....

best regards,

Ricmy
 
C

Cindy Meister

No, I can't give you any detailed information, as this isn't something I'd
ever try. Shell can't do all this, it can only start the Viewer. For the
rest, you'd need to use SendKeys (mimic the user executing commands using the
keyboard). It's not the kind of thing you want to use in a production
solution. If you're a developer, writing a program, and you don't recognize
these terms, you need to "Google" a bit...
 

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

Top