Jump to content
Sign in to follow this  
zwelgje

problem with copying an word document

Recommended Posts

zwelgje

Hi all!

I am a newbie and have a question about the code below. When I use this code another (previously opened)

Word document will be closed (or Word will ask to save the document).

How can I use this code without the closing of another Word document?

And no, it isn't _WordQuit that causes the problem :P

#include <Word.au3>

$sFilePath = @ScriptDir & "\test.doc"

_WordErrorHandlerRegister()

$oWordApp = _WordCreate($sFilePath, 0, 0)

$oDoc = _WordDocGetCollection($oWordApp, 0)

$oDoc.Select

$oWordApp.Selection.Copy

_WordQuit($oWordApp)

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.