Jump to content

Recommended Posts

Posted (edited)

According to the help file _WordDocPrint uses ByRef for the first parameter. This parameter has to be an object variable of a Word.Application document. So you can't specify a string, you need a variable.

#include <Word.au3>
$oWordApp = _WordCreate ("C:tempcall.doc")
$oDoc = _WordDocGetCollection ($oWordApp, 0)
_WordDocPrint ($oDoc)
_WordQuit ($oWordApp, 0)
Edited by water

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

To open an existing document use _WordDocOpen.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

This works here. Windows7 64bit, Office 2010 32bit.

#AutoIt3Wrapper_UseX64=n
#include <Word.au3>
$oWordApp = _WordCreate()
$oDoc = _WordDocOpen($oWordApp, "C:temptest.doc")
_WordDocPrint($oDoc)
_WordQuit($oWordApp, 0)

The directive in line 1 is necessary if you run a 64bit OS but Office is 32bit!

My UDFs and Tutorials:

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...