Hi Jon
I believe that the recent file list handling was reworked some years ago and the list is no longer
located where your code tries to find it. What version of LibreOffice are you using?
I also recomend that you install XrayTool, that let’s you inspect objects and would have made it
easier to see that the PickList you tried to access was empty.
http://bernard.marcelly.perso.sfr.fr/index2.html
I hope that the code below will do what you want. I used a few functions from the Tools library
that is bundled with LibreOffice. I recomend that you have a look at these functions especially
GetRegistryKeyContent.
Option Explicit
Sub Load1st()
Dim oCUA, oList, oItem As Object
BasicLibraries.LoadLibrary("Tools")
REM use GetRegistryKeyContent function from the module Tools.Misc
oCUA = GetRegistryKeyContent(sKeyName:="/org.openoffice.Office.Histories/Histories",
bforUpdate:=true)
oList = oCUA.getByName("URLHistory").getByName("OrderList")
If oList.hasByName("0") Then
oItem = oList.getByName("0")
If FileExists(oItem.HistoryItemRef) Then
REM use OpenDocument function from the module Tools.Misc
OpenDocument(oItem.HistoryItemRef, Array())
End If
End If
End Sub
Anyway I hope this helps you, and don’t hesitate to ask follow-up questions, and of course let me
know if the code isn’t working for you.
Regards,
Niklas
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
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
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.