![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-10 09:01 |
47,811 topics / 349,897 posts / today 0 new / 48,255 members |
| DOS批处理 & 脚本技术(批处理室) » How to call batch commands to implement the print function in the right-click of Word? |
| Printable Version 2,575 / 23 |
| Floor1 virtual | Posted 2008-11-02 19:24 |
| 社区乞丐 Posts 11 Credits -16 | |
|
Our company is currently working on a project, and a function needs to be implemented in the project as described below:
I installed a software that can convert various format documents into GIF image format, such as converting .doc, .txt, .pdf, .ppt, etc. When the mouse selects a certain file, there is a print option in the right-click menu. The system needs to use DOS commands to select a certain file and call the print function in the right-click menu. How should this be done? ───────────────── Moderation Record ───────────────── Performed: HAT Operation: Added search keywords in the post title Description: The original title "A Problem That Even a Company of 20 People Can't Solve" is not conducive to forum search Punishment: Since it is a new forum user, no point punishment is given Tip: It is recommended to read the following posts {1415}The Wisdom of Asking Questions {7326}Must-read for Forum Newcomers, Basic Code of Conduct for Everyone {22703}Please Don't Be an Impatient Person {32667}Those Who Can't Even Write a Clear Title, Wake Up {32825}This Board Severely Rectifies Poor Posts ───────────────── Moderation Record ───────────────── [ Last edited by HAT on 2008-11-2 at 20:08 ] |
|
| Floor2 yishanju | Posted 2008-11-02 19:40 |
| 银牌会员 Posts 1,357 Credits 1,488 | |
|
C:\Documents and Settings\Administrator>print /?
Print a text file. PRINT [/D:device] [[drive:][path]filename[...]] /D:device Specify the printer device. |
|
| Floor3 virtual | Posted 2008-11-02 21:00 |
| 社区乞丐 Posts 11 Credits -16 | |
|
It seems not right. I've tried. The key is that I don't know how to write /d:device. Is it the printer name or the port name?
|
|
| Floor4 dikex | Posted 2008-11-02 21:40 |
| 高级用户 Posts 366 Credits 788 | |
|
Example
To send Report.txt in the current directory to LPT2 connected to the local computer, type: print /d:LPT2 report.txt To send the Report.txt file in the c:\Accounting directory to the Printer1 print queue on the server \\CopyRoom, type: print /d:\\copyroom\printer1 c:\accounting\report.txt Detailed operation hh.exe C:\WINDOWS\Help\ntcmds.chm::/print.htm |
|
| Floor5 yishanju | Posted 2008-11-02 21:46 |
| 银牌会员 Posts 1,357 Credits 1,488 | |
|
I haven't used this command to print anything before, but the device should be filled with the printer command
|
|
| Floor6 virtual | Posted 2008-11-02 21:55 |
| 社区乞丐 Posts 11 Credits -16 | |
Originally posted by dikex at 2008-11-2 21:40: Did as above, my port name is img_00 Typing print /d:img_00 a.txt prompts that the img_00 device cannot be initialized |
|
| Floor7 virtual | Posted 2008-11-02 22:14 |
| 社区乞丐 Posts 11 Credits -16 | |
|
How to use such command parameters
|
|
| Floor8 yishanju | Posted 2008-11-02 22:17 |
| 银牌会员 Posts 1,357 Credits 1,488 | |
|
No translation needed as the text is in Chinese but the user just provided that sentence and the instruction is to translate from Chinese to English if not already, but this is already in Chinese. Wait, no, wait. Wait the original input is "家里没打印机,不知道怎么测试,楼主要是解决了这问题,可要上来发贴说一下怎么解决的" which needs to be translated to English.
Translation: There is no printer at home, I don't know how to test. If the landlord solves this problem, he must come up and post to say how to solve it. |
|
| Floor9 dikex | Posted 2008-11-02 22:46 |
| 高级用户 Posts 366 Credits 788 | |
|
Let's see if this is the case:
http://support.microsoft.com/kb/131470/zh-cn |
|
| Floor10 virtual | Posted 2008-11-02 23:41 |
| 社区乞丐 Posts 11 Credits -16 | |
|
"D:\Microsoft Office\Office12\WINWORD.EXE" /x /n /dde
[REM _DDE_Minimize][FileOpen("%1")][t=IsDocumentDirty()][FilePrint 0][SetDocumentDirty t][DocClose] I don't know how to write the key parameters. If you give a complete example with parameters, I will be able to end this thread. My writing is "D:\Microsoft Office\Office12\WINWORD.EXE" /x /n /dde fileipen("e:\a.doc") fileprint 0 but there is no result |
|
| Floor11 dikex | Posted 2008-11-02 23:59 |
| 高级用户 Posts 366 Credits 788 | |
|
Found somewhere, using the macro
"C:\......\WINWORD.EXE" "d:\......\a.doc" /mFilePrintDefault |
|
| Floor12 virtual | Posted 2008-11-03 10:43 |
| 社区乞丐 Posts 11 Credits -16 | |
|
The problem is like this: To use batch commands to realize the print function of right - click in Word, and the way to realize the right - click print function in PowerPoint is like this:
The same method is not effective for Word documents. How should it be done? (Note: You can test without installing a printer because printing just converts the document into an image) ───────────────── Moderation Record ────────────────── Execution: HAT Operation: Add search keywords in the post title; add code tags to the code Explanation: The original title "A problem that stumps many, many people, need your final solution" is not conducive to forum search Punishment: Deduct 2 points of points Tip: It is suggested to read the following posts {1415}The Wisdom of Asking Questions {7326}Essential Read for Forum Newcomers, Basic Code of Conduct for Everyone {22703}Please Don't Be an Impatient Person {32667}Those People Who Can't Even Write a Clear Title, Wake Up {32825}This Forum Severely Rectifies Poor - Quality Posts ───────────────── Moderation Record ────────────────── [ Last edited by HAT on 2008 - 11 - 3 at 16:12 ] |
|
| Floor13 ccily2701 | Posted 2008-11-03 10:50 |
| 初级用户 Posts 45 Credits 80 From jiangxi | |
|
DOS Batch Processing & Scripting Technology (Batch Processing Room)
|
|
| Floor14 virtual | Posted 2008-11-03 13:07 |
| 社区乞丐 Posts 11 Credits -16 | |
|
The problem is like this: To use batch commands to implement the print function in the right-click of Word, and for PowerPoint to implement the right-click print function is like this, "D:\Microsoft Office\Office12\POWERPNT.EXE" /p "e:\a.ppt". The same method for Word documents doesn't work. How to do it? (Note that you don't need to install a printer to test, because printing just converts the document into an image) "D:\Microsoft Office\Office12\WINWORD.EXE" /p "e:/a.doc" doesn't work
|
|
| Floor15 wxcute | Posted 2008-11-03 14:36 |
| 中级用户 Posts 211 Credits 458 | |
|
Write what software you installed
Post a picture of your right-click menu Find the corresponding value in the registry (if any) (no one will help you if you don't) ====================== Will be helpful to people answering questions |
|
| 1 2 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |