If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

Would turning on picture content control for that image help? You have to have the developer tools switched on to do that. I know you can specify external images, generally Word like images to be embedded in the document. TBH I am not sue that you will be able to alter a document externally with JavaScript but you might be able to have a URL to the resource and have the script like PHP determine the resource to deliver.

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

I don't want use PHP for that. This web application must be work locally without any complications.
I don't understand why it doesn't works, if function for this exist. I saw a lot of examples in VB script (I didn't test it). But for javascript I can open document, write text, format text. Only with picture i have problem with correct path. On microsoft page, I found, that this function for javascript have the same structure, like for C#, VBS. And path to the picture was from local disk.
I think here should be also possible. Do You have any idea or advice, what can I check more?

Ok, have you tried prefixing with file:// so you then have file://E:\logo.jpg

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

also... You may have to try E:\\logo.jpg because the \ may be denoting \E as an escaped pair of characters

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

Hi,
I would like to continue this topic with other questions related creating word document using javascript.
Few questions:
1. How can I change margins size in the word document using JS?
2. How can I make text alignemnt with JS?
3. How can I table create using JS?

Did somebody do these operations, or have any information or tutorials about creating word document by Javascript?

I program my document image reading and processing library using visual basic but not javascript or asp.net controls. While, I also can share my codes on Word image adding, which allows for adding and inserting image into Word page programmatically without having any dependency on Microsoft Office tools.

Public Sub AddImageToPage(page As DOCXPage, img As REImage, x As Single, y As Single, compression As WordCompression)
page.AddImage(img, x, y, compression)
End Sub