project_dir = pwd();
files = dir( fullfile(project_dir, '*.png'));
g = actxserver('powerpoint.application');
g.Visible = 1;
Presentation = g.Presentation;
[fn, pn] = uigetfile('*.pptx', 'Select PowerPoint File To Amend');
filename = fullfile(pn, fn);
Presentation = invoke(Presentation, 'open', filename);
slide_count = get(Presentation.Slides, 'Count');
for i=1:length(files)
slide_count = int32(double(slide_count)+1);
slide = invoke(Presentation.Slides, 'Add', slide_count{i}, 11);
set(slide.Shapes.Title.Textframe.Textrange, 'Text', 'SomeTitle');
slidefile = fullfile(project_dir, files(i).name);
Image{i} = slide.Shapes.AddPicture(slidefile, 'msoFalse', 'msoTrue', 0, 80, 720, 440);
end
outfile = fullfile(project_dir, 'DRAFT.pptx');
Presentation.SaveAs(outfile);
g.Quit;
g.delete;