30 questions from the last 30 days
0
votes
3
answers
51
views
How to create a macro in MS Word that will add angle brackets around each hyperlink?
This is my first question, so please let me know if the format is wrong in any way.
I am working for a publishing house that, as part of its style guide, requires all URLs to appear within angle ...
2
votes
3
answers
54
views
Detect highlighted text in .docx
I'm trying to detect text that has a coloured background in a MS Word docx, to separate it from the "normal" text.
from docx import Document
...
# Load the document
doc = Document(docx_path)
...
0
votes
1
answer
99
views
Insert text at intervals in entire document
I am trying to insert the text "||*||", with * being a counter, every 100 words.
This is to break up a script. For the points I insert a different picture. It gives me stop points for ...
0
votes
0
answers
82
views
How do I remove the header and footer of this HTML for a Word doc from the main body content?
I am using Power Automate to create a Word document on OneDrive, by using HTML and CSS in a Compose action. I am passing a base64 image to the header and this displays correctly. However, the Header ...
0
votes
1
answer
59
views
Excel vba mail merge first and last record not working
I am creating a spreadsheet to automate mail merge from a selected line in a listbox.
My function opens the word document ok but the first and last record section is not working and the mail merge ...
1
vote
1
answer
71
views
How to search a utf8 string in word files using powershell [duplicate]
I created a PowerShell script with assistance from GitHub Copilot. It works well with ASCII characters, but when I try to search for UTF-8 characters, it doesn’t return any results. For example, when ...
1
vote
1
answer
44
views
Macro to automate converting specifically formatted Strings to Hyperlinks in Word 2016
I work in a biblical commentary for a certain app. It is fed with a Word 2016 document. Now, in this Word document there are lots of references to Bible verses or passages.
The procedure to make a ...
0
votes
1
answer
66
views
Save file to specified location without overwriting old document
I am trying to save Word documents to a desired location with the push of a button.
I found the below code that saves to a desired location.
I can't use it more than once as it has the same name, with ...
0
votes
1
answer
57
views
Office Word Addin doesn't load task pane
I am really struggling to understand why my task pane is not showing up in Microsoft word. The button to trigger the taskPane appears under "AddIns" as expected but clicking it does not open ...
0
votes
0
answers
53
views
MS Office - Word doesn't read the merge data file
major problem this, i already lost several days of work time and i just can't find a solution.
We have Word documents with merge fields in, the docx files are connected to files that contain the data, ...
0
votes
0
answers
59
views
C# Microsoft.Office.Interop.Word Blanks
I'm trying to replace some placeholder words in a DOCX document using Word Interop. Every placeholder gets replaced correctly except for one. I want the single word "ContentX" in my document ...
0
votes
1
answer
44
views
How to set CoreFileProperties of Word Document through Open XML
Using OpenXML, how do I access this part of a Word Document? I specifically want to save something in the Tag.
The Word Document is saved programmatically through OpenXML in our code base. It is a ...
0
votes
0
answers
53
views
Insert a preselected image into a table cell when table is within a text box
My template creates a report based on UserForm inputs. It works fine except for inserting an image into a specific table cell; the table is within a text box. This is so that the image can then be ...
0
votes
0
answers
43
views
Microsoft Office Ribbon Custom Tabs not working
We have a Office (M365 Apps for Enterprise) Environment.
Usually I was deploying simple Ribbon customizations for Word with the "Word.OfficeUI" file under C:\users\bla\AppData\Roaming\...
-2
votes
0
answers
53
views
Measure Range Width in Points or Cm [closed]
So, given a range in the document, how can I make it return its width? It can be either in points or cm, IDRC.
I didn't find a single function, not even close. The Repository says .FitTextWidth can ...
2
votes
2
answers
34
views
Word document with command buttons -- copy entire document except for command buttons?
I have a word document that has a "Reset Fields" command button and a "Copy" button. Once the fields are filled in I need to copy the document to paste in an email and/or other ...
-1
votes
0
answers
40
views
How can I prevent an envelope in MS Word from printing the header
I have been tasked with updating numerous MS Word doc and docx files. The existing document files have an OLE Object consisting of a linked Word document which allowed all the files to have the ...
0
votes
1
answer
29
views
Adding duplicate comment to table Microsoft Word 2013
I'm trying in every way to add duplicates of each comment in VBA Word 2013, but for some reason when I run the script, Word crashes and all comments except the last one are created on the restored ...
-1
votes
0
answers
26
views
MS Word export to PDF with font Montserrat is not working properly
I'd like to use the Montserrat font (variant Regular) in a Word document and export it to PDF. For that, I downloaded and installed Montserrat-VariableFont_wght.ttf from Google:
https://fonts.google....
0
votes
0
answers
26
views
Word freezes after executing Excel VBA to create document
I have a large document template in Word (450+ pages 20+mb), which has over 100 bookmarked sections. I use an Excel spreadsheet to compile information about the document that a user is trying to ...
0
votes
0
answers
51
views
Pandoc: can we use Word as a template or reference
I've been trying to use Microsoft Word as a template with Pandoc, but I'm stuck and not sure if what I want to do is even possible. My goal is to have a Word document with a cover page where I can ...
0
votes
1
answer
44
views
Office Word Add-In ExecuteFunction displaying commands.html instead of running the function
I'm new to Office Add-ins so this might be a trivial mistake. For this Typescript React Add-in I have created a Context Menu Extension Point that on click is supposed to run a custom function ...
0
votes
0
answers
21
views
Applying template formatting using PHPWord [duplicate]
I've written a Laravel application that generates content for documents and inserts it into existing Word templates using PHPWord. My desired approach is pretty simple:
I generate the content that I ...
0
votes
0
answers
27
views
OpenXML: Table of Contents hyperlinks in Word detected as external links instead of internal ones
I'm trying to convert HTML content to Word using OpenXML.
The issue I'm facing is that the hyperlinks in the table of contents are detected by Word as "Existing File or Web Page" links:
When ...
0
votes
0
answers
24
views
How to Render DOCX Track Changes/Edit Suggestions in a React Application?
I’m building a React application that receives a DOCX file as a base64 string from a backend API. When opened in Google Docs, the file correctly displays tracked changes (insertions, deletions, ...
-1
votes
0
answers
18
views
delete extra paragraphs when inserting OOXML inside a content control
I am using the following code-
await Word.run(async (context) => {
const selectedRange = context.document.getSelection();
selectedRange.load();
await context.sync();
// Insert Content ...
0
votes
0
answers
30
views
Public myRibbon not stored long-term
The issue in essence:
I have an issue in being able to store a reference to my custom Ribbon. I can therefore only invalidate a dropDown menu in my Ribbon once, then my reference turns to "...
0
votes
0
answers
22
views
Modify xml in word document to reflect tracked changes
I'm trying to change a run in a very simple one-sentence Word document into deleted text in order test showing tracked changes in a Word document.
I've converted a very simple .docx file into a .zip. ...
0
votes
1
answer
55
views
Pass all the Microsoft Word font names (.FontNames) into a variant variable as in FontList = ?????.FontNames
I'm trying to create a Word document with the same paragraph in all the Word fonts. The macro to do this is printed below. I'm having a problem passing the all the Microsoft Word font names into my ...
0
votes
0
answers
17
views
Group Textboxes using XML in Word
Is there a way to group textboxes using XML. I have tried using <v:group> as can be seen below but this doesn't seem to work? Ideally I'd like the group to inherit the size of the textbox.
<v:...