Hi Khairul,
You can achieve this using “actxserver” function in MATLAB. Here is an example code of how you might read the text from a Word document:
wordApp = actxserver('Word.Application');
filePath = 'C:\path\to\your\document.docx'; % path to your GAN_1901.txt file
document = wordApp.Documents.Open(filePath);
content = document.Content.Text; %reads the text from file.
disp(content);
document.Close;
wordApp.Quit;
Feel free to refer to the “actxserver” documentation here: