Categories > OpenTBS with DOCX >

Error 'word/template.xml'

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Anthony
Date: 2017-02-04
Time: 12:25

Error 'word/template.xml'

Hi, I tried the example docx but I keep getting the same error, no matter which docx I use:


TinyButStrong Error OpenTBS Plugin: Cannot load "word/template.xml". The file is not found in the archive "demo_ms_word.docx". The process is ending, unless you set NoErr property to true.


Any help would be greatly appreciated!
By: Skrol29
Date: 2017-02-05
Time: 13:02

Re: Error 'word/template.xml'

Hi,

It's seems that your LoadTemplate() call is wrong.
Can you give the snipped you're using for your example ?
By: Anthony
Date: 2017-02-05
Time: 15:10

Re: Error 'word/template.xml'

thank you for your reply!

I copy&pasted the example PHP from the openTBS, just in to a function instead right away call.
By: Anthony
Date: 2017-02-06
Time: 08:40

Re: Error 'word/template.xml'

if(something){
    $custom_class->generateDocument($someVars);
}

The function inside this class has the copied php code from this: http://www.tinybutstrong.com/plugins/opentbs/demo/demo_merge.php
By: Skrol29
Date: 2017-02-06
Time: 23:06

Re: Error 'word/template.xml'

Hi,

The code from the demo does not give this error. So I think there is a difference. In the code you've implemented. The code will give the answer.
By: Anthony
Date: 2017-02-09
Time: 14:12

Re: Error 'word/template.xml'

yeah I couldn't figure it out, but I think it had something to do with the way I uploaded the file. I just started fresh and made a simple example that worked. sorry to have wasted your time :(