new openoffice extension macro error
A separate problem from my other post.
I opened up a document I'd already inserted citations in and tried to refresh the citations (I get the same error no matter what I do, though) and I get an error. I've stared the line where the macro stops. If I can provide any more help, let me know.
Read-Error
This property is read only
Function fnRemoveString(sSearchString As String, sTagName, sEnd) As String
Dim nTagStart As Long, nEnd As Long
fnRemoveString = sSearchString
nTagStart = InStr(fnRemoveString, sTagName)
If nTagStart = 0 Then Exit Function
nEnd = InStr(nTagStart, fnRemoveString, sEnd)
#If MSWD Then
'Mid(sSearchString, nTagStart, nEnd - nTagStart + 1) = ""
fnRemoveString = Left(fnRemoveString, nTagStart - 1) & Right(fnRemoveString, Len(fnRemoveString) - nEnd - Len(sEnd) + 1)
#Else
********* Mid(fnRemoveString, nTagStart, nEnd - nTagStart + 1, "")
#End If
End Function
I opened up a document I'd already inserted citations in and tried to refresh the citations (I get the same error no matter what I do, though) and I get an error. I've stared the line where the macro stops. If I can provide any more help, let me know.
Read-Error
This property is read only
Function fnRemoveString(sSearchString As String, sTagName, sEnd) As String
Dim nTagStart As Long, nEnd As Long
fnRemoveString = sSearchString
nTagStart = InStr(fnRemoveString, sTagName)
If nTagStart = 0 Then Exit Function
nEnd = InStr(nTagStart, fnRemoveString, sEnd)
#If MSWD Then
'Mid(sSearchString, nTagStart, nEnd - nTagStart + 1) = ""
fnRemoveString = Left(fnRemoveString, nTagStart - 1) & Right(fnRemoveString, Len(fnRemoveString) - nEnd - Len(sEnd) + 1)
#Else
********* Mid(fnRemoveString, nTagStart, nEnd - nTagStart + 1, "")
#End If
End Function
Mid(fnRemoveString, nTagStart, nEnd - nTagStart + 1, "")
I'm using zotero 1.0.0rc5 and the plugin version is the newest for neooffice on mac os x.
errors occurs only when I try to work with a document with existing citations from old zotero versions...
by the way: thanks for the great work! zotero fits my needs perfectly.
Mid(fnRemoveString, nTagStart, nEnd - nTagStart + 1, "")
There are two things wrong with this statement. First, a function name is being passed as an argument to a string function. Second, the assignment operator is missing and there is an extra argument to the Mid function. If you look a few lines up in the code, you will see the intended statement (commented out):
Mid(sSearchString, nTagStart, nEnd - nTagStart + 1) = ""
Just move this statement down and replace the erroneous one with it. Be sure to remove the leading apostrophe (comment prefix). Lastly, save the file!
this works perfectly for me!
luci