如题,我想在程序里面访问一个WORD文档,但是不用把它打开,而是直接打印出来,最好有源代码,谢谢!解决了就给分

解决方案 »

  1.   

    试试
    ShellExecute(m_hWnd, "print", "xxx.doc", NULL, NULL, SW_HIDE);
      

  2.   

    可以考虑用office提供的activex控件
      

  3.   

    howtotell(天行健,君子以自强不息。) 能说一说具体哪个控件吗?最好有原代码,谢了!
      

  4.   

    cheng_young(古道西风瘦马) 
    谢谢了,这样是可以的,但是有没有其他的方法实现呀?这样不能弹出打印对话框进行打印设置!
      

  5.   

    参考: 
    微软的Knowledge Base的文章:
    “Q176069 OWTO: Print a Range of Pages in Word Using OLE Automation” 
    “Q153675 ow To Use Code to Print a Word Document in a General Field” http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q176/0/69.asp&NoWebContent=1http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q153/6/75.asp&NoWebContent=1