The macro below, first requests the location of the library and the destination folder. Next a new addon file is being created by help of the "Package" service. The "Package" service also provides an "XSingleServiceFactory" interface to create file and folder objects. To navigate trough the addon files structure a "XHierarchicalNameAccess" interface is used. Once the right path object has been retrieved use its "XNameContainer" interface to add the file objects to the addon file. To copy the content of a file to the file object use its "XActiveDataSink" interface and provide the file by opening the file with the "SimpleFileAccess" service. To make the folder a library, change the folders "MediaType" property to the apropriate string. For further details see http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2008/200809_Frysak/200809_Frysak_Automating_OOo_ooRexx_Nutshells.pdf. |