I am trying to close all the opened writer documents and thought i had a
working solution until i tested the code while a calc spreadsheet was
opened. The spreadsheet was also closed. How do i determine the type of the
opened document so i can close it only if it's opened in writer? The code i
have right now is as follows:
<pre>
var
lComponents, lDocument: OleVariant;
begin
lComponents := FDesktop.GetComponents.CreateEnumeration;
while lComponents.hasMoreElements do
begin
lDocument := lComponents.NextElement;
lDocument.Close(True);
end;
end;
</pre>
--
View this message in context:
http://nabble.documentfoundation.org/Delphi-How-to-close-all-opened-writer-documents-tp3848246p3848246.html
Sent from the Users mailing list archive at Nabble.com.
--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted