Questions tagged [ms-word]
For programming questions related to Microsoft's "Word" editor. Questions on general usage of the editor are off-topic for Stack Overflow; they should be asked on Super User instead.
19,447
questions
0
votes
1
answer
13
views
Trying to Write a VBA Macro for Duplicated Paragraphs
I'm trying to edit macro to identify duplicated paragraphs in a Word document. This code identifies the second instance quite well, but I'm trying to get it to highlight the first instance as well in ...
0
votes
1
answer
9
views
How to move cursor to the end of a word document using VBA from the acces level
My goal is to add formatted text at the end of a previously created word document form in acces using VBA.
I was able to add formatted text at the beginning of the document and add unformatted text to ...
-4
votes
0
answers
16
views
How to implement speech to text using houndify [closed]
I want to implement c++ app that will allow user to get his speech as text on office apps like word, any ideas
-1
votes
1
answer
37
views
I have Microsoft VBA Code to bulk Find and Replace in .word files - it it possible to edit to
I was provided the code below through the Microsoft support service to help me go through and batch "find and replace" specific text in a large number of word documents. The use case for ...
0
votes
0
answers
6
views
How to remove blank page in word file using python docx or any other library available in python?
I have a word document in Docx format which has multiple blank pages. I need to delete all the blank pages in the document using python. I have tried to delete empty lines in the document. But it is ...
0
votes
0
answers
24
views
For Each Loop for ActiveX Checkboxes in MS Word VBA
I am trying to make a Word Document that will move a textbox (Just a shape in word) using a reference State Code that is a value from a Text Box (ActiveX) to a different Word Document. The State Code, ...
-1
votes
2
answers
43
views
Simulate, through a macro, a click on a custom ribbon item
I've seen similar questions asked, but did not manage to find an answer to my specific problem.
I have in place a custom ribbon tab, with custom buttons. Their purpose is to each insert a QuickPart in ...
0
votes
0
answers
30
views
word vba Select specific page of specific Section
I use p1s11,s9,s12 in blow code to print page 1 of section 11 and section 9 (entirely) and section 12 (entirely)
Application.PrintOut OutputFileName:=FinalNamePath,
Range:=wdPrintRangeOfPages, Item:=...
0
votes
0
answers
26
views
Word macro variable in hebrew
I encounter a problem with Microsoft visual basic that variable values in Hebrew are converting to gibberish.
Please see the attach picture
The computer locale is Hebrew/ win 11
Why? what can I do to ...
-1
votes
0
answers
12
views
How can i send messages from MS Word file to wechat?
I have messages in word file and need to send the message on wechat. Is there any api or option by which i can send message to wechat with just single click.
0
votes
0
answers
21
views
Excel Add Rows and Value from Excel Table to Specific Word Table Template
Thank you in advance, I need help in completing the below code, the code currently works to add the number of rows in the Table(3) of my word template as per the available rows in excel table, the ...
0
votes
0
answers
33
views
Error on VBA during conversion from PDF to Doc file in MS Access
I am try to convert MS Access Report "Premier Practice" to PDF file "Premier Practice.pdf" than convert to Premier Practice.doc. Finally open Premier Practice.doc
I am getting ...
0
votes
0
answers
11
views
Check if a Word doc is read only in a C# program [duplicate]
I'm writing a program in C# using open XML that reads in data from one Word document and transfers it to another Word document template. I want to make sure that neither file selected is "read-...
0
votes
1
answer
13
views
Office.Interop.Word - app.DisplayAlerts = WdAlertLevel.wdAlertsNone; Not Disabling Alerts
I'm trying to disable read-only alerts when opening word files in C#. I initially tried app.DisplayAlerts = false. This did not work and I believe it's because I have a newer version of word. Now, ...
-1
votes
0
answers
28
views
unable to wrap text in word document using VBA
I have an input text file(Line size and column size varies). I want to convert it into document with the same format(same length as in text file, not to span to the next line if the input line has ...
1
vote
0
answers
33
views
+50
Disable Macros Automatically Microsoft Word Interop
I have a addin in word that on startup tries to use some macros (I presume that's what it's trying to do anyway), and pops up a window that looks similar to
I think the issue is that the addin has an ...
-2
votes
0
answers
38
views
Populate word tables from an Excel table
From our audit database I derive an Excel table like this one below. What I need to do is populate a table in a word template document with the content of the first row in the excel table, then drop a ...
-1
votes
1
answer
36
views
How to convert .doc files to .docx files by ignoring the template references [closed]
We are facing issues on templates for older documents(.doc). The requirement is to convert the .doc file into .docx format and upload into FileNet system. Challenging is these doc files are using some ...
-1
votes
1
answer
25
views
Find and replace or copy and past from excel to word
I'm trying do generate some files docx of data from excel to word.
I'm just learning the basic of VBA, so I lasted a few hours to find this a find and replace logical. But at the time I tried with a ...
0
votes
2
answers
52
views
Mass Find & Replace including subfolders
I don't really know VBA but have had some success with manipulating code in the past. I'm getting stuck with this one, where I tried to mix 2 different ideas into one. What I want to do is a mass find ...
0
votes
0
answers
21
views
Add a picture in Word from VBA without it moving with the text added after it?
I've added the picture to the word document and when I try to add text on lines below it on the document, the picture is moved by the text being printed behind it instead.
How can I add the picture so ...
0
votes
0
answers
24
views
Is there any possibility for document paragraph-level tagging and filtering, e.g. by VBA or C#?
The MS Word document has the ability to mark tags at the file level, which can be used from Windows Explorer to make it easier to search for files by document’s tags.
Is there a similar feature in MS ...
0
votes
0
answers
35
views
Save tree view or copy to word [closed]
I have the following tree view in an access form (structure generated in visual basic using java), and I wish to save the full tree and view it in MS Word. Is this possible? Note that I don't need the ...
0
votes
1
answer
48
views
Excel VBA Macro: User Defined Type Not Defined STILL AFTER I added reference
Thanks everyone for your help and sorry that I couldn't reply earlier. My problem is still there😭
I read the link you posted there and update the original codes I found. (Maybe in a wrong way because ...
0
votes
0
answers
19
views
How to avoid adding content controller within a content controller
As a user when he/she tries to add a content control we would like to validate that if a content controller is already there as a parent ?
Our Environment
Platform [PC desktop, Mac, iOS, Office on ...
0
votes
0
answers
26
views
how to check if selected paragraph is in a right column or in a left column in a two column paragraph word VBA macro
I want to make a macro that adds a text box in the right of a paragraph in the right columns, and in the left of a paragraph in the left columns.
I'm using page columns
I'd like to know how to make a ...
0
votes
1
answer
24
views
Can macros be used to change properties of ActiveX Controls in Word?
I have a worksheet with multiple fillable fields (ActiveX Controls-- text, drop-down, dates, etc.) and essentially want the form to go to two parties. The first party will fill in a majority of the ...
0
votes
1
answer
28
views
Replacing a beacon by a Bookmark in word using excel vba
I am developping an excel macro and i need to replace a specific word (beacon) in my .docx by a bookmark, i found this on the microsoft site.
Sub BMark()
' Select some text in the active document ...
1
vote
1
answer
37
views
Error 450 Wrong number of arguments or invalid property assignment on vba
I want to select a specific word in a .docx using vba excel and then replace it by a BookMark, to do it i want to select the word so i have this code
With word_fichier
With Selection.Find
...
-1
votes
1
answer
38
views
Save docx as pdf AppleScript MS Word script for use in Shortcuts.app on macOS
I created a shortcut (for shortcuts.app) for automatic pdf document processing, but i need to convert some docx files to pdf first. I've made a loop (in shortcuts.app), that gets docx files as an ...
0
votes
2
answers
28
views
How can i center the images pasted on email body using the code below? And the greeting too
Im using the code below to copy different ranges of an excel sheet as image and paste on a email body. Its working fine, but I want to paste this images centered on the email, thats my question...
Sub ...
0
votes
1
answer
47
views
How to triplicate each sentence in each paragragh in a word document
I'm trying to triplicate (copy and paste) each sentence in each paragraph in ms word document, i have come up with the below code but it doesnt exit loop and runs till word crushes. Any alternative or ...
0
votes
0
answers
29
views
Python delete paragraphs between two words in word
Attach you will find a word document as an example.
I want to delete the paragraphs between HI and BYE.
So I tried to write a code that starts deleting when it sees the word HI and stops when it sees ...
0
votes
0
answers
15
views
Replaced Text is not coming up in Exact case in Word using Interop in C#
var Range = (Word.Document) doc.Range;
Range.Find.Execute(FindText: "Test", ReplaceWithText: "Testing");
The Output is Coming as "TESTING". The text is getting ...
0
votes
0
answers
34
views
Hide full row if cells are merged in word table
I have a file with multiple tables and by using the below code I am trying to access the rows which have specific terms using an array.
I successfully select the whole rows and apply hidden formatting ...
0
votes
2
answers
22
views
Count how many occurrences you find in the selection
I've been trying to count how many open brackets "(" and close brackets ")" I have in my selection and fire other subs accordingly. I've been using the following code:
Public Sub ...
0
votes
0
answers
13
views
Microsoft Word: Putting Table In-Line with bullet point
Whenever I create a table in Microsoft Word, it puts the table underneath the respective bullet point instead of in-line with the bullet point. How can I get the table to be in line with the bullet ...
0
votes
0
answers
16
views
Extract Table information from .docx in the form of dictionary and dataframe using python
I am trying to read a word document and extract all table information in the form of json or dataframe with key and value.
Sample image of tables in word document is as below.
Expected Output:
Below ...
0
votes
0
answers
10
views
Word find and replace with first character from previous line
•
A. Review the Stakeholder Register.
•
B. Review the RACI Chart.
•
C. Review the work breakdown structure.
•
D. Examine the Change Management Plan.
(Correct)
•
A. Customer, ...
0
votes
2
answers
47
views
MS Word macro to delete all empty paragraphs leaving sections interruptions
I'm written this macro in MS Word to remove all empty paragraphs.
It works well but, if document contains more than one section, the macro deletes the interruption and merges all sections into one.
...
0
votes
0
answers
14
views
Make a Drop Down of QuickPart Keywords
I am trying to make a drop down list of all the custom keywords using Quickpart keywords. So that they will be auto detected from the Sharepoint. Is there any work around this?
-1
votes
0
answers
33
views
Python adding opening and closing tags to word documents
I'm currently trying to figure out a way to input opening and closing xml tags to certain lines inside word documents I have.
Example word document I have that needs editing.
<title>Hello this ...
0
votes
0
answers
37
views
Office schema URI - The Document opened in read only mode
I have installed (ASP.NET MVC) application in machine.
I want the user to open the word document in machine by URL like this: (http://10.0.10.106:8080/FS/report.docx) to edit and save this document.
...
-1
votes
0
answers
15
views
How do I automatically define a specific color for each letter of the alphabet in the Microsoft word?
How do I automatically define a specific color in Word for each letter of the alphabet in the word 2019?
For example, when I type a text in Word, I want all the letters T to be red and all the letters ...
-2
votes
1
answer
45
views
How to name sheets in loop based on FilePath variable using VBA to process tables from Word doc(s)? [closed]
The context is that I have a boatload of data dictionaries for various data bases strewn across multiple Word document files. Those files have (among other extraneous information) tables that contain ...
0
votes
1
answer
39
views
max number of vba bookmarks
I am currently working on a Word-document I want to use as a template. This template provides a "structure" including many bookmakrs. The template is filled using these bookmarks, e.g. ...
0
votes
1
answer
20
views
Office Word vba: How to have different allignments in a word table cell?
I want to write in a word some information via vba.
I'm having a problem with the contents of a table I want to import.
As you can see my table has 2 columns. The first has the id and the second some ...
0
votes
1
answer
14
views
Write docm files using Python win32com and python-docx
Win32com only works on Windows operating systems and can process docm files.
However, python-docx works on all operating systems and cannot process docm files.
I want to process the docm file using ...
0
votes
1
answer
34
views
Grab Text/Header from word document along with table data VBA
Currently, I am currently using the below script to capture tables from the word document and store them in Excel workbook as separate sheets. THe pages have 2-3 lines of text/headers and 2-3 lines of ...
1
vote
1
answer
31
views
How to modify an inline element in Pandoc using lua filter?
I am beginner in Pandoc and Lua who is experimenting with converting Word documents to Markdown. I want to convert chapter headings in Word to paragraph of text in Markdown. Furthermore, I want to ...