Clear Filters
Clear Filters

ActiveX How to modify the value of a MS Word table cell using Matlab?

4 views (last 30 days)
I have a word document that I have that has a table in it.
I want to search for a phrase: "Cyclomatic complexity" in a table and then modify the cell or next column entry value to the right of that phrase: "102" to become "25".
---------------------------------------------------
Word = actxserver('Word.application');
Word.Visible = 0;
Docs = Word.Documents;
Doc = Docs.Open(filename);
Word.Selection;
Word.Selection.Find.Execute('Cyclomatic complexity',0,0,0,0,0,1,1,0,'Cyclomatic complexity',2,0,0,0,0);
%Modify the value from "102" to "25" ?
Doc.Save; Docs.Close; invoke(Word,'Quit');
---------------------------------------------------
So I can find the phrase: "Cyclomatic complexity"...
But not sure how to change the value in the following cell?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!