Openoffice3

69 views
Skip to first unread message

mmorandi

unread,
May 9, 2008, 11:00:39 AM5/9/08
to zotero-dev
With this small change the plugin 1.0b3 seem to work correctly, at
least with a DEV300m11 build. Hope this is the rigth place to post
this, and that it's usefulf, as
I was not able to find where the code repo sits. If not, apologize for
the noise.

Marco

' Gets a tag from the document properties
Function fnGetProperty(sProperty As String) As String
Dim sPropertyName As String, i As Integer, sPropertyValue As
String
i = 0

#If MSWD Then
On Error GoTo EndOfFunction
#End If
While (True)
i = i + 1
sPropertyName = sProperty & "_" & i

#If MSWD Then
fnGetProperty = fnGetProperty &
ActiveDocument.CustomDocumentProperties(sPropertyName).Value
#Else
if not
thisComponent.DocumentInfo.PropertySetInfo.HasPropertyByName(sPropertyName)
then
thisComponent.DocumentInfo.AddProperty(sPropertyName,0,"")
endif
sPropertyValue =
thisComponent.DocumentInfo.getPropertyValue(sPropertyName)
If sPropertyValue = "" Then GoTo EndOfFunction
fnGetProperty = fnGetProperty & sPropertyValue
#End If
Wend
EndOfFunction:
Exit Function
End Function
Reply all
Reply to author
Forward
0 new messages