Jump to content

Microsoft Word Automation Library


big_daddy
 Share

Recommended Posts

  • Replies 115
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Moderators

$oDoc.PrintOut ()

is that all i need?

All of those parameters are optional, but they give you the ability to control how and what the document prints. If all you need to do is print the entire document to the default printer, then the above example will work.
Link to comment
Share on other sites

Hi,

Looks good; ** Special request [cf post #2 in this thread]

Can you do my original reqyest too for this so I can use it instead of my others? [or is it already there]

I still use these a lot for that purpose; perhaps I can use yours early on if you get the runmacro going.

Best, Randall
Link to comment
Share on other sites

  • Moderators

This is some great work BD...keep it up :whistle:

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

@doucment - Thank you! As for your question you need to provide more detail as to what exactly you are wanting. If the below example doesn't answer your question please start a new topic in the support forum.

#include <Word.au3>

$sFilePath = "Your file path"
$oWordApp = _WordCreate ($sFilePath)
$oDoc = $oWordApp.ActiveDocument
$sText = $oDoc.Range.Text
MsgBox(0, "Document Text", $sText)
_WordQuit ($oWordApp, 0)

Thanks,

Bob

Link to comment
Share on other sites

Thanks for making the help file.

There is a typo in the instructions for using _WordDocAdd. "_WordQuit (...)" is used instead of _WordDocAdd (...)

#include <Word.au3>

_WordQuit ( ByRef $o_object [, $i_SaveChanges = -2 [, $i_OriginalFormat = 2 [, $b_RouteDocument = 0]]] )

-rjs

Link to comment
Share on other sites

Word.au3 and IE_T2.0_3.au3 and IE_T2.0_4.au3 contain the same Global contstant declaration (Global Const $LSFW_LOCK = 1, $LSFW_UNLOCK = 2).

Including Word.au3 and either of the IE_T2.0 libraries will generate a "Can not redeclare a constant" error message.

Commenting out the line in either library will solve the problem.

-rjs

Link to comment
Share on other sites

  • Moderators

@jeff24 - Thanks, it will be fixed in the next release.

Sorry for the delayed release. I have the _WordDocFindReplace function complete, but I'm still trying to iron out a couple new functions.

Thanks,

Bob

Edit: I will also rename the Global Constant for the next release.

Edited by big_daddy
Link to comment
Share on other sites

  • Moderators

New update available! See update history in first post for changes.

Enjoy,

Bob

p.s. The example for _WordPropertyGet is missing do to an error on my part. Should have an updated version of the help file posted soon.

Edit: Updated help file, thanks Jos!

Edited by big_daddy
Link to comment
Share on other sites

Hi,

I am going in circles, i'm afraid;

What am I doing wrong here? (file already open in Word, selecting it again; should it not attach with a success?)

#include <Word.au3>
$sWordFile=FileOpenDialog("",@ScriptDir,"Doc files (*.doc)")
Local $o_Result = _WordAttach($sWordFile)

--> Word.au3 Warning from function _WordAttach, $_WordStatus_NoMatch

Best, Randall
Link to comment
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
 Share

  • Recently Browsing   0 members

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