Jump to content
Sign in to follow this  
faustf

auit and word

Recommended Posts

faustf

hi guy , why when i try to send in printing the document dont go use this command

_WordDocPrint ("\config\call.doc")

Share this post


Link to post
Share on other sites
water

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:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
faustf

but why i must crate call.doc ???

i had just

Share this post


Link to post
Share on other sites
water

To open an existing document use _WordDocOpen.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

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:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.