21,483 questions
5
votes
1
answer
106
views
Word.Document Close ComException
We have some legacy code that late binds to Microsoft.Office.Interop.Word to do various things with documents.
This code has worked fine for years.
The Solution is written in VB.NET and consists of ...
0
votes
0
answers
77
views
async function not executing via Word dynamic menu ribbon button
I have a dynamic menu button in our custom VSTO ribbon. I am loading content to it at runtime. That process is working fine. Dynamic drop down is creating fine. this is the code.
In Ribbon.xml
<...
0
votes
0
answers
43
views
Word Online Fails to Render Diagrams/SmartArt via WOPI: ResReader.ashx 404 Errors
We have integrated Word Online functionality into our web application using the WOPI protocol to allow users to edit, review and approve Word documents. While standard text documents load and co-...
1
vote
1
answer
44
views
OpenXML TableRow bottom border hidden by next row
Trying to apply a bottom border to a table row using <w:tblPrEx>, the bottom border is hidden by the next row, even if I give the next row a top border. If I delete the next row the bottom ...
0
votes
1
answer
70
views
Mail merge with hyperlinks inside if statement (Microsoft word) [closed]
I am trying to create a mail merge with a hyperlink inside of an “if” statement (the link only appears if a certain mergefield exists), where both the link address and display text are different ...
0
votes
3
answers
135
views
VBA Selection.InsertCaption and automatically adding non-breaking space between the label and number
Recently I had the pleasure to review a few specification documents edited in MS Word, containing around 1000 tables and figures, each of those with a caption that did not separate caption label and ...
0
votes
1
answer
106
views
Bulk Document Reformatting - VBA Compile Error [closed]
What is wrong with the following VBA module: an attempt to standardise font and layout on over 2000 docx MSWord365 pages to Montserrat SemiBold, 14 pt in justified paragraphs?
Text
Sub ...
-1
votes
1
answer
52
views
Error unknown op code for conditional - What am I missing?
I have tried for hours to debug this condition in Word, and I simply cannot see what the error is. Is there a space or something that should not be there?
I am out of ideas what to look for.
I have ...
0
votes
1
answer
63
views
MS WORD VBA - remove extra n.n.n section headings in a marco fails on heading level 1
Sooooo.... I have a situation where I had to recover 1000+ documents from PDF back into word. Most of the documents used heading numbering...
1 Heading One
1.1 Heading Two
1.1.1 Heading Three
etc.
...
0
votes
0
answers
72
views
Word Interop Find.Execute() modifies the source Range object to a undesired value
I'm using Word Interop Libraries to identify bold text in a Word document and add comments to those sections. However, while running the code, I noticed an issue(from the Word UI): when a bold part or ...
0
votes
0
answers
36
views
Prevent SharePoint Word documents from being opened in the desktop application
I'm working on a SharePoint Embedded solution which, among other things, creates Word document view/edit links using the Graph API endpoint createLink : https://learn.microsoft.com/en-us/graph/api/...
0
votes
1
answer
121
views
How to fix "object/block variable not set" error?
I'm trying to use VBA on Word 2013.
I'm on Win10.
I created a macro a long time ago to format documents to how I want them.
But,now, when I click to run the macro, I get: "OBJECT VARIABLE OR ...
0
votes
1
answer
51
views
Doc4j corrupts docx file after inserting paragraph
I am trying to add a simple text paragraph with text ""Hello from Java test!" in an existing simple docx file (contains only one dummy line of text already) using docx4j.
But when I am ...
0
votes
0
answers
73
views
Word tables don't merge when deleting data between them
I have 2 Word documents, each with 2 tables in them separated by a paragraph mark. The tables are simple but different # rows and columns. I want to merge the two tables in each document. In docA, I ...
1
vote
1
answer
102
views
Formatting a word table created in excel using VBA
I have a table like this excel table and I want to create a Word Table to look like this
I am a novice user of VBA so this is genuinely killing me because I can't figure out how to make this happen.
...
3
votes
0
answers
80
views
How can I set the number of pages per sheet in a Microsoft Word macro using VBA?
I am trying to automate a print job for a word document that I run daily. The task is executed as 7 print jobs on a 3 page document and requires differing sizes for the document. This is my desired ...
1
vote
2
answers
143
views
Using Docxtemplater horizontally expand nested loop in a MS Word Table
We have data that looks like this:
[
{
firstName: 'Susan',
lastName: 'Storm'
meta: [
{
age: 30,
email: '[email protected]'
}
]
},
{
...
0
votes
1
answer
64
views
Word VBA: Why merely reading List.Range property changes the document (and adds "Bullets and Numbering" item to undo stack)?
I am experiencing surprising behavior from MS Word (version 2007).
Steps to reproduce:
Open a blank Word document.
Create a list (numbered or bulleted, does not matter) and type at least one item ...
1
vote
1
answer
93
views
Create then save Word doc with variable name to OneDrive using Excel VBA
I have code to create a new Word document then copy and paste information from Excel.
It then needs to check if a file exists with a specific filename from variables from the Excel sheet and if not ...
0
votes
0
answers
68
views
Modular way to handle object that could be either Selection.ChildShapeRange or Selection.ShapeRange
I am puzzled about a modular way to handle an object that could be either Selection.ChildShapeRange or Selection.ShapeRange in Word 2013. The former applies if the user has selected a shape within a ...
1
vote
0
answers
56
views
Word Addin - Get version from the manifest file
We have developed a Word Add-in using Angular and are currently using OfficeJS for performing Word-related operations.
We want to programmatically access the manifest version (i.e., the version ...
0
votes
0
answers
20
views
Using Word on a Mac. Mail merge ELSE IF function with paragraph entered causes the paragraph to lose its autonumber
I'm on a Mac, and using Desktop Word. Here is screenshot of my document with the Mergefield (not what I want to do, but shows the problem I'm trying to solve)
This works
Now, onto what I'm try to do. ...
-3
votes
3
answers
318
views
Efficient mass find-replace in Word via VBA
I have a VBA-based tool that basically for each row in the Excel takes a defined word document and performs number of find-replace operations. This has been working well so far, but I am starting to ...
0
votes
1
answer
63
views
MSAccess VBA Find Text in Word Document Select All Text After Find
I want MS Access to search for text in a Word document and then, when it has found the text, select all of the text following the find to be analysed further within Access. I have the code working ...
0
votes
0
answers
59
views
How to tag tables to a page number in word document using Aspose
I am reading a word document using python-docx, https://pypi.org/project/python-docx/ but it has limitation as it does not give us the page information.
The word document has lot of tables which could ...