Python Forum
How to transfer Text from one Word Document to anouther
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to transfer Text from one Word Document to anouther
#1
Hello there,

im a python newcomer and i decided to make the following my first python project. Im a state official from Germany and i help disabled people there as an administrator. We of course have a Program which helps us in our outgoing Papers.

The Problem is as follows:
Our social workers develop a plan to help the disabled people. I get an documentation of that. Some datas from this word document translate into my outgoing official letter. This information doesnt get transfered to my document automatically. You can imagine the problem like the following:

Document A (from the social worker which goes to me)
Date created 27.09.2019

Period of service 01.09.2019 - 29.02.2020

...

Document B (the document i have to create)
...referring to the document of 27.09.2019...

...we hereby grant the service from 01.09.2019 - 29.02.2020 ...



My solution methods:

In my opinion the code should look like this
#define variables
Date created = First line after 3rd word number

Period of service = 3rd line after 3rd word number

#insert them into my papers
Date created insert variable=first line after "of"
Date created insert variable.add_run(Date created)

[...]

-----------------------------

as ive said the "docx" expansion for python works realy well. but it cant define a place in the word data as an variable so i could insert something there. neither it can "read" a document and define things i need later for my papers.

So can you guys help me out? This is realy a project of my heart for me because even though im not a professional programmer, my work (which i realy love) provides me the problems which i could solve with my future to be hobby.

Looking forward for your replies Smile Big Grin
Reply


Messages In This Thread
How to transfer Text from one Word Document to anouther - by konsular - Oct-08-2019, 03:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Replace a text/word in docx file using Python Devan 4 3,854 Oct-17-2023, 06:03 PM
Last Post: Devan
  How to summarize an article that is stored in a word document on your laptop? Mikedicenso87 2 738 Oct-06-2023, 12:07 PM
Last Post: Mikedicenso87
  find some word in text list file and a bit change to them RolanRoll 3 1,589 Jun-27-2022, 01:36 AM
Last Post: RolanRoll
  python-docx regex: replace any word in docx text Tmagpy 4 2,333 Jun-18-2022, 09:12 AM
Last Post: Tmagpy
Question Problem: Check if a list contains a word and then continue with the next word Mangono 2 2,575 Aug-12-2021, 04:25 PM
Last Post: palladium
  How to read check boxes from word document srikanthpython 0 2,666 Mar-30-2021, 01:58 PM
Last Post: srikanthpython
  Searching for specific word in text files. JellyCreeper6 1 1,774 Nov-03-2020, 01:52 PM
Last Post: DeaD_EyE
  How to extract a single word from a text file buttercup 7 3,726 Jul-22-2020, 04:45 AM
Last Post: bowlofred
  Python Speech recognition, word by word AceScottie 6 16,151 Apr-12-2020, 09:50 AM
Last Post: vinayakdhage
  print a word after specific word search evilcode1 8 4,963 Oct-22-2019, 08:08 AM
Last Post: newbieAuggie2019

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020