Jump to content
Sign in to follow this  

Appending word document in background

Recommended Posts



I need to append existing word document without opening it. i.e. Document should be updated in the background.

I am using below code.

$oWordBlank = _WordAttach ("Test.doc", "FileName")

$oDoc2 = _WordDocGetCollection ($oWordBlank, 0)

;Add .Gif file to word document.

_WordDocAddPicture ($oDoc2, "test.gif" ,1, 1, $oRange)


This works fine if i open document before running this script. i.e. it can attach existing instance of

word document and append it. But it does not work if document is NOT opened.

Can you please suggest suitable alternative.



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