MATLAB: How to add page numbers to a Word document generated with the Publisher in MATLAB 8.2 (R2013b)

docMATLABnumberingpagepublishword

I would like to add page numbers to the Word document that is created when publishing my MATLAB files. Is it possible to do this with the PUBLISH function in MATLAB 8.2 (R2013b)?

Best Answer

The ability to add page numbers to published Word documents is not available in MATLAB.
As a workaround you can use the ability of MATLAB to control Microsoft Word with the ACTXSERVER function to add page numbers to the Word document after publishing. Please run the attachment for an example of adding a custom footer that insert the current date and page number fields.