How can i anchor points on my .docx template file to dump my variable strings?Merging docx files together including headers, footers and picturesWhat are the available 3rd party options to a) modify a templated word document b) convert a docx to pdfFind and replace text in .docx file - PythonPHP Email Attachment pdf and docx files don't get sent properlyRead and Write DOCX fileKnitting RMarkdown to Word loses internal anchorsCan you modify only a text string in an XML file and still maintain integrity and functionality of .docx encasement?Displaying a PDF in <object> tag in CodeIgniter viewHow to store substrings from .docx to java bean class?Splitting a docx by headings into separate files in Python
Why isn't there any 9.5 digit multimeter or higher?
Will this creature from Curse of Strahd reappear after being banished?
What steps would an amateur scientist have to take in order to get a scientific breakthrough published?
What are the cons of stateless password generators?
How to store my pliers and wire cutters on my desk?
Why is it considered acid rain with pH <5.6?
Is it okay for me to decline a project on ethical grounds?
How can I kill my goat?
Why were contact sensors put on three of the Lunar Module's four legs? Did they ever bend and stick out sideways?
Is there a way to know the composition of a Team GO Rocket before going into the fight?
8086 stack segment and avoiding overflow in interrupts
Can a US President, after impeachment and removal, be re-elected or re-appointed?
reconstruction filter - How does it actually work?
Polyhedra, Polyhedron, Polytopes and Polygon
Why didn’t Christianity spread southwards from Ethiopia in the Middle Ages?
Why does this RX-X lock not appear in Extended Events?
What is this 4 sharp symbol and what does it mean?
Anti-cheating: should there be a limit to a number of toilet breaks per game per player?
How did the SysRq key get onto modern keyboards if it's rarely used?
Nested keyval proper parsing
Is there a word to describe someone who is, or the state of being, content with hanging around others without interacting with them?
Why did I lose on time with 3 pawns vs Knight. Shouldn't it be a draw?
Can you place a support header in the ceiling?
Why use the "finally" keyword?
How can i anchor points on my .docx template file to dump my variable strings?
Merging docx files together including headers, footers and picturesWhat are the available 3rd party options to a) modify a templated word document b) convert a docx to pdfFind and replace text in .docx file - PythonPHP Email Attachment pdf and docx files don't get sent properlyRead and Write DOCX fileKnitting RMarkdown to Word loses internal anchorsCan you modify only a text string in an XML file and still maintain integrity and functionality of .docx encasement?Displaying a PDF in <object> tag in CodeIgniter viewHow to store substrings from .docx to java bean class?Splitting a docx by headings into separate files in Python
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to find the right approach to insert text that is stored in variables in to a docx template file stored in the same directory as my app for gathering the data strings.
I looked at abusing the mail merge work arounds in word but that seems to be a lot more locked down in later versions of office...i have 365.
the python.docx module seems clunky for what i need using runs etc...
How can i anchor points on the template to dump my variable strings?
i might add that the template has a lot of borders and boxes around each section and spans 2 pages.
would it be easier to do if my doc was a pdf?
what other file format would be a better match for what i want to do?
python-3.x docx
add a comment |
I am trying to find the right approach to insert text that is stored in variables in to a docx template file stored in the same directory as my app for gathering the data strings.
I looked at abusing the mail merge work arounds in word but that seems to be a lot more locked down in later versions of office...i have 365.
the python.docx module seems clunky for what i need using runs etc...
How can i anchor points on the template to dump my variable strings?
i might add that the template has a lot of borders and boxes around each section and spans 2 pages.
would it be easier to do if my doc was a pdf?
what other file format would be a better match for what i want to do?
python-3.x docx
I've had luck using the XLWT module: pypi.org/project/xlwt
– Hoog
Mar 26 at 19:50
XLWT seems to be only for excel files or i am i missing something?
– Yan
Mar 26 at 23:45
It is, I misunderstood what you needed.
– Hoog
Mar 27 at 11:33
add a comment |
I am trying to find the right approach to insert text that is stored in variables in to a docx template file stored in the same directory as my app for gathering the data strings.
I looked at abusing the mail merge work arounds in word but that seems to be a lot more locked down in later versions of office...i have 365.
the python.docx module seems clunky for what i need using runs etc...
How can i anchor points on the template to dump my variable strings?
i might add that the template has a lot of borders and boxes around each section and spans 2 pages.
would it be easier to do if my doc was a pdf?
what other file format would be a better match for what i want to do?
python-3.x docx
I am trying to find the right approach to insert text that is stored in variables in to a docx template file stored in the same directory as my app for gathering the data strings.
I looked at abusing the mail merge work arounds in word but that seems to be a lot more locked down in later versions of office...i have 365.
the python.docx module seems clunky for what i need using runs etc...
How can i anchor points on the template to dump my variable strings?
i might add that the template has a lot of borders and boxes around each section and spans 2 pages.
would it be easier to do if my doc was a pdf?
what other file format would be a better match for what i want to do?
python-3.x docx
python-3.x docx
edited Mar 26 at 23:47
Yan
asked Mar 26 at 19:46
YanYan
346 bronze badges
346 bronze badges
I've had luck using the XLWT module: pypi.org/project/xlwt
– Hoog
Mar 26 at 19:50
XLWT seems to be only for excel files or i am i missing something?
– Yan
Mar 26 at 23:45
It is, I misunderstood what you needed.
– Hoog
Mar 27 at 11:33
add a comment |
I've had luck using the XLWT module: pypi.org/project/xlwt
– Hoog
Mar 26 at 19:50
XLWT seems to be only for excel files or i am i missing something?
– Yan
Mar 26 at 23:45
It is, I misunderstood what you needed.
– Hoog
Mar 27 at 11:33
I've had luck using the XLWT module: pypi.org/project/xlwt
– Hoog
Mar 26 at 19:50
I've had luck using the XLWT module: pypi.org/project/xlwt
– Hoog
Mar 26 at 19:50
XLWT seems to be only for excel files or i am i missing something?
– Yan
Mar 26 at 23:45
XLWT seems to be only for excel files or i am i missing something?
– Yan
Mar 26 at 23:45
It is, I misunderstood what you needed.
– Hoog
Mar 27 at 11:33
It is, I misunderstood what you needed.
– Hoog
Mar 27 at 11:33
add a comment |
1 Answer
1
active
oldest
votes
I have found a tutorial posted by Chris Moffitt that uses lxml package to use a form of mail merge with word templates.
https://pbpython.com/python-word-template.html
This is exactly what i was after. It uses "quick parts" to form an anchor in the word template so that i can replace them later using python code in sections of my document.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365168%2fhow-can-i-anchor-points-on-my-docx-template-file-to-dump-my-variable-strings%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have found a tutorial posted by Chris Moffitt that uses lxml package to use a form of mail merge with word templates.
https://pbpython.com/python-word-template.html
This is exactly what i was after. It uses "quick parts" to form an anchor in the word template so that i can replace them later using python code in sections of my document.
add a comment |
I have found a tutorial posted by Chris Moffitt that uses lxml package to use a form of mail merge with word templates.
https://pbpython.com/python-word-template.html
This is exactly what i was after. It uses "quick parts" to form an anchor in the word template so that i can replace them later using python code in sections of my document.
add a comment |
I have found a tutorial posted by Chris Moffitt that uses lxml package to use a form of mail merge with word templates.
https://pbpython.com/python-word-template.html
This is exactly what i was after. It uses "quick parts" to form an anchor in the word template so that i can replace them later using python code in sections of my document.
I have found a tutorial posted by Chris Moffitt that uses lxml package to use a form of mail merge with word templates.
https://pbpython.com/python-word-template.html
This is exactly what i was after. It uses "quick parts" to form an anchor in the word template so that i can replace them later using python code in sections of my document.
answered Mar 27 at 18:09
YanYan
346 bronze badges
346 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365168%2fhow-can-i-anchor-points-on-my-docx-template-file-to-dump-my-variable-strings%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I've had luck using the XLWT module: pypi.org/project/xlwt
– Hoog
Mar 26 at 19:50
XLWT seems to be only for excel files or i am i missing something?
– Yan
Mar 26 at 23:45
It is, I misunderstood what you needed.
– Hoog
Mar 27 at 11:33