Create/Modify a Microsoft Word .docx file using APP Inventor 2

386 views
Skip to first unread message

MauYellow

unread,
Jan 12, 2017, 3:34:30 PM1/12/17
to MIT App Inventor Forum
Hi guys, i'm not new at using MI2 but i've found myself struggling on this:

I'd like to create an app that creates/modifies a microsoft word ( .docx ) file.

File will contain images too, as well as capital letters, different bold and colours. 

- I thought of creating a  .docx file on my SDcard and then just modify it by setting the missing text/numbers on the correct places but it seems impossible.
- Then i thought of running an activity (i have microsoft word installed in my device) and when calling a procedure it will create this brand new document from zero, but it seems even harder.

I know it sounds hard but i hope someone will manage to help me out, i'd much appreciate and love you forever.

SteveJG

unread,
Jan 12, 2017, 4:02:35 PM1/12/17
to MIT App Inventor Forum
Working directly with a MS doc file is not possible with AI2.

Here are some options that include saving the doc on your device as a txt file,  or as a pdf and working with that.


These discuss some of the issues involved.

MauYellow

unread,
Jan 13, 2017, 3:20:17 AM1/13/17
to MIT App Inventor Forum
I've tried to convert the .docx into a .txt , it is easy to modify but it will lose all the images and font/bold/colours and there's no way to bring them back once you've finished.

My aim is to set up an app that will give me a specific .docx of .pdf file with already setted images with just few parts of text changed.

e.g. 

MauYellow

unread,
Jan 16, 2017, 6:08:09 AM1/16/17
to MIT App Inventor Forum
Up Anyone?

Tim Carter

unread,
Jan 17, 2017, 6:25:15 PM1/17/17
to mitappinv...@googlegroups.com
So does it have to be an editable docx file or a viewable pdf?

For pdf viewing:

Does it have to be a docx or pdf, could you do something with html instead?

MauYellow

unread,
Jan 20, 2017, 3:14:10 AM1/20/17
to MIT App Inventor Forum
I'd like it to be ad editable .docx file, but seems to be impossible to add pictures on it through the way of converting it in .txt first.
If editable .docx is not obtenible, a viewable pdf file would be also a good idea.
But i repeat, .docx in what i'm really looking for.
Thank you in advace

MauYellow

unread,
Jan 20, 2017, 3:15:45 AM1/20/17
to MIT App Inventor Forum
And, for the pdf, i dont need to see one, but i need to create one with font/bold letters, colours, images, and anything else is concerned (just ike the picture i uploaded few posts ago)

Tim Carter

unread,
Jan 20, 2017, 5:54:46 PM1/20/17
to MIT App Inventor Forum
I believe you are going about this the wrong way.

Seems you have a form that needs to be completed, and then perhaps to be updated later, and that this may then need to be printed out?

Consider replicating the form using the native components of AI2, and saving the changing data to a database: tinydb, tinywebdb or Fusion tables.

This data can then be saved and recalled / edited in the AI2 app.

If you need to print, you could export the data to, say, a google sheet, from where a pdf could be created for printing. You could also seek out Android Cloud Print solutions, or use email to send the data.

Does this make more sense?

Tim
Reply all
Reply to author
Forward
0 new messages