How to find the value of custom properties in libre office writer?

Hi

I want to check the value of the custom properties in the libre office writer … I am not getting how to get that value. PLease let me know how can i retrieve the value of custom properties in the source code ?

Here’s an example my macro that gets the custom properties:

poetic form

  • classification
  • subclassification
  • versionNumber
  • versionSuffix
  • poemName
  • dbVersion

from my Writer poem template:

public sub getDocCustomProperty(propName as string)

 oDocProps = ThisComponent.getDocumentProperties()
 oProps =	 oDocProps.UserDefinedProperties
 
	select case propName 
		case is="All"  			
  			 poeticForm=			oProps.[PoeticForm]
  			 Classification=		oProps.[Classification]
  			 Subclassification= 	oProps.[Subclassification]
   			 VersionNumber = 		oProps.[versionNumber]
   			 VersionSuffix =		oProps.[versionSuffix]
  			 poemName=	 			oProps.[poemName]
   			 dbVersion=				oProps.[dbVersion] 
   	    case is ="Form"
   	    	 poeticForm=			oProps.[PoeticForm]
   	    case is ="Class"
   	   		 Classification=		oProps.[Classification]
   	    case is ="SubClass"
   	     	 Subclassification= 	oProps.[Subclassification]
   	    case is ="versionNumber"
   	         VersionNumber = 		oProps.[versionNumber]
   	    case is ="versionSuffix"
   	         VersionSuffix =		oProps.[versionSuffix]  	        
   	    case is ="poemName"
   	         poemName=	 			oProps.[poemName]	
   	    case is ="dbVersion"
   	         dbVersion=				oProps.[dbVersion]  
   	    case else
   	  end select
end sub

HTH