Sign in to follow this  
Followers 0
faustf

auit and word

8 posts in this topic

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



the same effect also whit full path :D

Share this post


Link to post
Share on other sites

#4 ·  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:

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

but why i must crate call.doc ???

i had just

Share this post


Link to post
Share on other sites

the same dont go

Share this post


Link to post
Share on other sites

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

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  
Followers 0