Jump to content

Recommended Posts

Posted

Hello,

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)

_WordDocSave($oDoc2)

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.

Regards

Kash.

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
  • Recently Browsing   0 members

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