Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread modifying Word docs (.doc/.docx)
Sat, Mar 5 2016 12:54 PMPermanent Link

thetoolwiz

I haven't looked hard for this, but I'm wondering if there's an easy way to modify Word docs through EWB?

I know the mechanism in Delphi is via an OCX, although I know there are also some native implementations that let you manipulate various MS Office files without the OCX.

Basically, I'm looking to build something that lets you take a folder full of Word files and apply a common set of edits to each one -- adding a cover page, end page, page template/style, and page headers and footers.

(The files I have happen to be .docx format, if that makes any difference.)

-David
Sun, Mar 6 2016 3:40 AMPermanent Link

Matthew Jones

<thetoolwiz> wrote:
> I haven't looked hard for this, but I'm wondering if there's an easy way
> to modify Word docs through EWB?
>
> I know the mechanism in Delphi is via an OCX, although I know there are
> also some native implementations that let you manipulate various MS
> Office files without the OCX.
>
> Basically, I'm looking to build something that lets you take a folder
> full of Word files and apply a common set of edits to each one -- adding
> a cover page, end page, page template/style, and page headers and footers.
>
> (The files I have happen to be .docx format, if that makes any difference.)
>
> -David
>
>

It would have to be done with the assistance of a server, so that's where
it would be best done.

--
Matthew Jones
Sun, Mar 6 2016 10:16 AMPermanent Link

Raul

Team Elevate Team Elevate

On 3/5/2016 12:54 PM, thetoolwiz wrote:
> I haven't looked hard for this, but I'm wondering if there's an easy way to modify Word docs through EWB?
> I know the mechanism in Delphi is via an OCX, although I know there are also some native implementations that let you manipulate various MS Office files without the OCX.
> Basically, I'm looking to build something that lets you take a folder full of Word files and apply a common set of edits to each one -- adding a cover page, end page, page template/style, and page headers and footers.

EWB is a javascript app so even doing something as simple "take files
from a folder" is very difficult due to the security model. Normal
delphi app would be better suite for this in general.

Quick google shows that modern office (2016 at least) has a javascript
api for creating add-ins so this might be another way to achieve what
you want (you'd need ms word though for this to work so that might be
show stopper). Not sure how much EWB can be here without looking more
into it.

Where EWB can be useful is for creating a user interface to interact
with back wned web server of some sorts - i believe Ooffice365 has a web
api that one can interact with.

Raul

Mon, Mar 7 2016 3:42 AMPermanent Link

thetoolwiz

Raul wrote:

<<
EWB is a javascript app so even doing something as simple "take files
from a folder" is very difficult due to the security model. Normal
delphi app would be better suite for this in general.
>>

So TStringList doesn't have LoadFromFile / SaveToFile methods?

Is there any way to do that? (ie., access local files)

-David
Mon, Mar 7 2016 8:34 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

David,

<< So TStringList doesn't have LoadFromFile / SaveToFile methods? >>

No.

<< Is there any way to do that? (ie., access local files) >>

Not in a universal way with IE9 as the base browser support, no.

Tim Young
Elevate Software
www.elevatesoft.com
Sat, Mar 3 2018 9:06 PMPermanent Link

erickengelke

Avatar

Tim Young [Elevate Software] wrote:

David,

<< So TStringList doesn't have LoadFromFile / SaveToFile methods? >>

No.

<< Is there any way to do that? (ie., access local files) >>

There is a way that works in every browser except maybe IE.  It's covered in my Elevate Web Bulder Book using an external JavaScript library.

Erick
http://www.erickengelke.com
Sun, Mar 4 2018 4:51 AMPermanent Link

Uli Becker

> There is a way that works in every browser except maybe IE.  It's covered in my Elevate Web Bulder Book using an external JavaScript library.

So either post the solution here or stop promoting your book. That's not
the purpose of this (help) forum.

Uli
Mon, Mar 5 2018 4:04 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> So either post the solution here or stop promoting

Hmm, I'm not sure what to think of this. The key information is there - you can do this using Javascript. So you can just go search for how to do it in Javascript, and link it in. Or, you could use a ready made solution in the book, that contains a load of good info, and save time. People can choose how much to give of their time or code here, and that will vary according to each person's needs and desires. Some will never post anything useful to others. Some will post loads of handy samples. Some do this for altruistic reasons, some to try to get work, some for selling their books (which can't be a big seller!). Me, I like to help because I want this great product to succeed and do well, and because you might want to hire me to do a project. 8-) But I think it is not fair to attack someone for offering the answer in a paid form. There is nothing to stop someone else answering it fully for free. Just my 2c, others may feel differently.

--

Matthew Jones
Mon, Mar 5 2018 5:07 AMPermanent Link

Uli Becker

Matthew,

<<
But I think it is not fair to attack someone for offering the answer in
a paid form.
>>

The reason I did that is that I've never seen any concrete help by him
in this forum - his only "help" is to promote his book.

<<
in the book, that contains a load of good info, and save time
>>

I don't agree. Unfortunately I bought it. Lots of (large) printed code
and no details where I hoped to find those, e.g. the PhoneGap chapter.
You can copy&paste the given code, nothing else.

Sorry to say that, but for me that's really annoying. I don't mind
anyone publishing a book and make money with it, but this forum is not
the right place for a continuous promotion.

Uli

Mon, Mar 5 2018 10:21 AMPermanent Link

Raul

Team Elevate Team Elevate

On 3/5/2018 4:04 AM, Matthew Jones wrote:
> Hmm, I'm not sure what to think of this. The key information is there - you can do this using Javascript.

I'm with Uli on this one.

Info posted as "it can be done in JS" is useless as posted IMHO

If you want to to post the source link to javascript (for example
something like this
https://www.html5rocks.com/en/tutorials/file/dndfiles/ to say this would
be starting point) then i would be OK with it.

Raul
Image