Word 2010 broken with latest version of the Word plugin
Hi,
I've been using Zotero 2.0 beta with Word 2010 without any issues until today when Zotero in Word informed me that I needed to update my version of the Word plug-in. However, the new version throws a "The macro cannot be found or has been disabled because of your security settings" when I click on the "insert citation" button. It's in a trusted location so it is not my security settings. I tried running the macro directly and I got the error "Compile error in hidden module: Zotero" which probably explains the first one.
I know Word 2010 is still in beta, so you're not really obliged to support it, but, still it would be nice if it did work (as it did until today).
Thanks in advance,
Tom
I've been using Zotero 2.0 beta with Word 2010 without any issues until today when Zotero in Word informed me that I needed to update my version of the Word plug-in. However, the new version throws a "The macro cannot be found or has been disabled because of your security settings" when I click on the "insert citation" button. It's in a trusted location so it is not my security settings. I tried running the macro directly and I got the error "Compile error in hidden module: Zotero" which probably explains the first one.
I know Word 2010 is still in beta, so you're not really obliged to support it, but, still it would be nice if it did work (as it did until today).
Thanks in advance,
Tom
I presume the Zotero client is not expecting to get sent a 64 bit pointer and that's what's causing it not to do anything.
I presume this is how it used to work before.
if you can't see my email in my profile - mattyp@ksu.edu
If you can send me your version of the template, I can install it.
Thanks!
i got exact the same problem, runnig WIN7x64 and Word 2010x64.
Would be great, if you can send me the template (uni(at)centner.net) .
Thanks al lot
Regards
it is working now.
The modificated code is (thanks cpf):
Option Explicit
Type COPYDATASTRUCT
dwData As Long
cbData As Long
lpData As LongPtr
End Type
Private Const WM_COPYDATA = &H4A
Private Declare PtrSafe Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName _
As String) As Long
Private Declare PtrSafe Function SendMessage Lib "user32" Alias _
"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal _
wParam As Long, lParam As Any) As Integer
Private Declare PtrSafe Function SetForegroundWindow Lib "user32" _
(ByVal hwnd As Long) As Long
Private Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
(hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Sub ZoteroInsertCitation()
Call ZoteroCommand("addCitation", True)
End Sub
Sub ZoteroInsertBibliography()
Call ZoteroCommand("addBibliography", False)
End Sub
Sub ZoteroEditCitation()
Call ZoteroCommand("editCitation", True)
End Sub
Sub ZoteroEditBibliography()
Call ZoteroCommand("editBibliography", True)
End Sub
Sub ZoteroSetDocPrefs()
Call ZoteroCommand("setDocPrefs", True)
End Sub
Sub ZoteroRefresh()
Call ZoteroCommand("refresh", False)
End Sub
Sub ZoteroRemoveCodes()
Call ZoteroCommand("removeCodes", False)
End Sub
Sub ZoteroCommand(cmd As String, bringToFront As Boolean)
Dim cds As COPYDATASTRUCT
Dim ThWnd As Long, pwi As Long
Dim buf(1 To 255) As Byte
Dim a$, args$
Dim i As Long
Dim ignore As Long
' Try various names for Firefox
Dim appNames(4)
appNames(1) = "Firefox"
appNames(2) = "Browser"
appNames(3) = "Minefield"
appNames(4) = "Namoroka"
For i = 1 To 4
ThWnd = FindWindow(appNames(i) & "MessageWindow", vbNullString)
If ThWnd <> 0 Then
Exit For
End If
Next
If ThWnd = 0 Then
MsgBox ("Word could not communicate with Zotero. Please ensure Firefox is running and try again.")
Exit Sub
End If
' Allow Firefox to bring a window to the front
If bringToFront Then Call SetForegroundWindow(ThWnd)
' Set command line arguments
args$ = "-silent -ZoteroIntegrationAgent WinWord -ZoteroIntegrationCommand " & cmd
a$ = "firefox.exe " & args$ & Chr$(0) & "C:\"
Call CopyMemory(buf(1), ByVal a$, Len(a$))
cds.dwData = 1
cds.cbData = Len(a$) + 1
cds.lpData = VarPtr(buf(1))
i = SendMessage(ThWnd, WM_COPYDATA, 0, cds)
If Err.LastDllError = 5 Then
If Dir("C:\Program Files\Mozilla Firefox\firefox.exe") <> "" Then
Call Shell("""C:\Program Files\Mozilla Firefox\firefox.exe"" " & args$, vbNormalFocus)
ElseIf Dir("C:\Program Files (x86)\Mozilla Firefox\firefox.exe") <> "" Then
Call Shell("""C:\Program Files (x86)\Mozilla Firefox\firefox.exe"" " & args$, vbNormalFocus)
End If
End If
Shell ("C:\Program Files (x86)\Mozilla Firefox\" & a$)
End Sub
Regards
I have the exact same problem with W7 x64 and Office x64.
Could you be kind enough to send me the modified version as well? I am totally unable to customize the extension by myself.
Thanks a lot
Loïs
wamsaya@gmail.com
i too am facing the same problem W7 x64, Word 2010 x64, can you please send me also the modified version?
regards
srini
update: i tried editing on my own.. seems to be working
Thanks for your help,
Nick
nfahrenkopf@gmail.com
http://www.zotero.org/support/windows_word_plugin_manual_installation_instructions
1. Find the zotero.dot file (go to your c:/ drive and search for it, then follow the link. Make sure to edit the file that is in use by MS Word.) Two possible locations:
- C:\Users\*YOURNAME*\AppData\Roaming\Microsoft\Word\STARTUP\zotero.dot
- C:\Users\*YOURNAME*\AppData\Roaming\Mozilla\Firefox\Profiles\894umbre.default\
extensions\zoteroWinWordIntegration@zotero.org\install\zotero.dot
2. Open "zotero.dot" in MS Word
3. Enable the "developer" tab (if you have not already done so. Search MS Word Help to get this up.)
4. In the "Developer" tab, Click "Macros"
5. Click on "NewMacros.ZoteroInsertCitation" and click on the "Edit" button
6. A couple of sub-windows open up. You'll be editing the one that says: "Zotero - Zotero (Code)"
7. Replace the entire contents with the entire contents of the above post.
8. Click "Save"
@cfp and @FGUL: Does the modified plugin still work in non-64-bit Word? If not, is it possible to make changes that would let one version of the plugin operate in both 32-bit and 64-bit Word?
"Zotero Integration Error: Zotero experienced an error updating your document"
Any idea to solve it?
P.S. I submit an error report (ID: 1526941334) regarding this issue, but am not sure where or how to describe the problem in this forum.
This is getting a little untenable. Word 2010 releases in just a few weeks, and I'd like to be able to use it with Zotero.
Report ID: 1292628070
One point that might help, is once you have loaded the Developer toolbar, you can click on the Document Template icon to see the location of the loaded Zotero.dot template. Mine was C:\Users\MyName\AppData\Roaming\Microsoft\Word\STARTUP.
If you are having problems with Word showing more than one toolbar, then delete the WinWord integration add-on from Firefox and delete any erroneous Zotero.dot templates. Then start again!
http://msdn.microsoft.com/en-us/library/ff700513%28office.11%29.aspx#odc_dnofftalk_ta_WorkingwithVBA32bit64bitOffice2010_Workingwith32bit64bitOffice2010
I'll have a look into this and try work up some code, it shouldn't be too hard to modify the existing VBA code with some if... then... else statements here and there!?
users\"name"\appdata\roaming\mozilla\firefox\profiles\2u35c9zi.default\extensions\zoterowinwordintegration@zotero.org\install
when I double-clicked the icon a new MS Word window opened and said "macros disable". I enabled the macros and it worked fine--for just this session. Any ideas on how I might "enable" this file on startup?
And don't double-click the .dot file. Copy it to your Word startup folder, which should be listed in Tools→Templates and Add-ins in Word, if you want/need to install it manually.
But again, start a new thread if you're having trouble, since this doesn't seem to be related to the above.