Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Clear the workspace
- clearvars;
- close all force;
- clc;
- % Specify target file
- TargetFile = 'Lorem_Ipsum.docx';
- % Initialize ActiveX server object
- Word_Application = actxserver('Word.Application');
- Word_Document = Word_Application.documents.Open([pwd,'\',TargetFile]);
- % ----------------%
- % HERE BE DRAGONS %
- % ----------------%
- % Close ActiveX server
- Word_Document.Close;
- Word_Application.Quit;
- delete(Word_Application);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement