pwoerpoint application dose not close

Add-in Express™ Support Service
That's what is more important than anything else

pwoerpoint application dose not close
i want the host application to be close after the add-in work 
Yossi Mazal Tov


Guest


i tried :

case HostType of
ohaExcel : begin
LCID := GetUserDefaultLCID;
ExcelApp.ActiveWindow.Application.ActiveWorkbook.Close(OleVarFalse,EmptyParam,EmptyParam,LCID);
ExcelApp.Quit;
ExcelApp.Disconnect;
end;
ohaWord : begin
WordApp.ActiveDocument.Close(OleVarFalse,EmptyParam,EmptyParam);
WordApp.Quit;
WordApp.Disconnect;
end;
ohaPowerPoint : begin
PowerPointApp.ActivePresentation.Close;
PowerPointApp.Quit;
PowerPointApp.Disconnect;
end;
else
WriteTextFile(LogFileName,'UnNowen File Type - To Close',True);
end;

word,excel work fine.

but powerpoint remain with empty none active windows.
how can i force closing it;
Posted 01 Apr, 2013 04:28:43 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Yossi,

I have just tried the following code, it works fine:

    ohaPowerPoint: begin
      // close all presentations
      for i := PowerPointApp.Presentations.Count downto 1 do begin
        PowerPointApp.Presentations.Item(i).Saved := msoCTrue;
        PowerPointApp.Presentations.Item(i).Close();
      end;

      PowerPointApp.Quit();
      PowerPointApp.Disconnect();

      // force Quit
      PowerPointApp.Quit();
      PowerPointApp.Disconnect();
    end;



I tested the code against PowerPoint 2010 and 2013.
Posted 01 Apr, 2013 06:32:28 Top
Yossi Mazal Tov


Guest


well....

// force Quit
PowerPointApp.Quit();
PowerPointApp.Disconnect();

those tow linw did the trick.
Thanks
Posted 01 Apr, 2013 07:56:26 Top