Not signed in (Sign In)
 

Quick Links

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorcfp
    • CommentTimeSep 24th 2009
     
    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
    • CommentAuthorcfp
    • CommentTimeSep 24th 2009
     
    OK I moved to the Trunk XPI and edited the start of the code to read (changes in bold):


    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)


    and it does at least now compile, though calling the various macros doesn't seem to do anything now so it's far from working.
    • CommentAuthorcfp
    • CommentTimeSep 24th 2009
     
    (If it wasn't clear this is x64 Word 2010, hence the need for LongPtr's (though on 32-bit systems LongPtr is 32 bit.)

    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.
    • CommentAuthorcfp
    • CommentTimeSep 24th 2009
     
    OK I hacked in a work-around, by adding:

    Shell ("c:\Program Files (x86)\Mozilla Firefox\" & a$)


    to the end of the function.

    I presume this is how it used to work before.
    • CommentAuthormpalmati
    • CommentTimeDec 21st 2009 edited
     
    Any chance that you have an installable version of this? I am getting the exact same error message, but am not savvy enough to play around with the code/xpi. Using x64 version on windows vista.

    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!
    • CommentAuthorFGUL
    • CommentTimeJan 12th 2010
     
    Hello,

    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
    • CommentAuthorFGUL
    • CommentTimeJan 12th 2010
     
    Hello,

    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
    • CommentAuthorlbasti01
    • CommentTimeJan 20th 2010
     
    Hello,

    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
    • CommentAuthorsrinitata
    • CommentTimeJan 27th 2010 edited
     
    hi,

    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
    • CommentAuthorgroston
    • CommentTimeMar 9th 2010
     
    This worked for me. Please note that you may need to manually remove the old version of Zotero.dot before installing the new version.
  1.  
    Could someone explain where/how to make these edits? Or post a patch? Or update the install files? I just started trying to use Zotero on 64 bit Windows 7 with 64 bit Office 2010 RC and am having the same problems. I could probably copy and paste this code... if I even knew where to go!
    Thanks for your help,
    Nick
    nfahrenkopf@gmail.com
    • CommentAuthorgroston
    • CommentTimeMar 11th 2010
     
    Download the .xpi and rename to .zip. In one of the folders you will find zotero.dot. Edit the macros in this file. Rename the .zip back to .xpi and reinstall. Also, see my note above. It may also be necessary to copy zotero.dot to the Start flder if the install doesn't work properly.
  2.  
    I just (re)downloaded the .xpi from the homepage of zotero.org, I renamed it .zip but couldn't find anything named zotero.dot.
    • CommentAuthoradamsmith
    • CommentTimeMar 11th 2010
     
    did you open the zip file?
  3.  
    nfahrenkopf: groston is referring to the WinWord plugin XPI, not the main Zotero XPI.
    • CommentAuthorgroston
    • CommentTimeMar 11th 2010
     
    The plug-in xpi, not the main xpi
  4.  
    OK, thanks. I uninstalled the plug-in. Downloaded it, found the file, opened the macro and copy-pasted the code above from FGUL. I saved the updated .dot file on my desktop, and replaced the one in the zip with the new one. I think changed the .zip back to the .xpi and installed it in FireFox and I get the same error message.
  5.  
    Update: I added the new zotero.dot to my Windows startup folder. I restarted my computer and when Word opened I had two rows of buttons- and they work. (Yay!) But when I start a new document, or open an old one there is only one row, and they don't work. Is there some other startup folder I was supposed to put zotero.dot into? I don't need it opening everytime I start the PC, but I would like those buttons to work...
  6.  
    You put it in the Word startup folder, not the Windows startup folder.

    http://www.zotero.org/support/windows_word_plugin_manual_installation_instructions
    • CommentAuthorwangke
    • CommentTimeApr 20th 2010
     
    After being modified, it works ok now on my pc: win7x64+word2010x64+firefox.v3.6.3.x86+zotero.2.0.2
    • CommentAuthorDAL
    • CommentTimeMay 11th 2010
     
    I also attempted this. It took about 2 hrs to figure it out. I'm pretty sure that all one has to do is modify the zotero.dot file, but it's not good enough just to open the file and cut-and-paste. It has to be edited in a macro editor (like the one in MS Word). For some reason, I had to use a 32-bit version of MS Word to do my editing. After all that, I tried it again with the 64-bit version, and it worked. Go figure!) Anyway, here are the steps I used:
    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"
    • CommentAuthorDAL
    • CommentTimeMay 11th 2010
     
    Now, would someone please tell me why there is not a separate download of the Word For Windows plug-in of the 64-bit version of MS Word? I'm using brand new installs of Word 2010 Student on a stable Windows 7 platform, and both Firefox 3.6.3, Zotero 2.0.3, and the Zotero Word for Windows Plugin 3.0a3 were installed for the first time today, so I'm guessing its not unique to my situation. This is a pretty easy fix once you figure it out, but come on, this is not a Linux user's group.
    • CommentAuthorajlyon
    • CommentTimeMay 12th 2010
     
    My guess is that the Zotero folks haven't been able to test the patch personally, perhaps because they don't have Word 2010... In any case, you're absolutely correct that a version for the 64-bit version of Word 2010 should be distributed.

    @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?
  7.  
    This is not working for me (I am a user of Windows 7 64 bit, Word 2010 beta 64 bit). I can see buttons in 'Add-Ins' menu, but have got two same errors during processing every macro code.

    "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.
    • CommentAuthorkleonard
    • CommentTimeJun 2nd 2010
     
    I've just tried the fix that DAL (above) listed for Word 2010 beta (PC, Firefox). Zotero works ok in new documents, but not old ones--even old ones in which it worked previously.

    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
    • CommentAuthorgawbul
    • CommentTimeJun 10th 2010
     
    I'm running Windows 7 Ultimate 64-bit, Word 2010 Professional Plus 64-bit, Zotero Plugin 2.0.3 and Zotero WinWord Integration 3.0a3. FGULs' code (credits to cpf too) from January 12th post worked perfectly for me!

    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!
    • CommentAuthorgawbul
    • CommentTimeJun 10th 2010
     
    This may be of some use for adapting the plugin to be used with both 32bit and 64bit versions of Office 2010 (if indeed there are issues, which I suspect there might be):

    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!?
    • CommentAuthorSimon
    • CommentTimeJun 12th 2010 edited
     
    The plug-in has already been patched to support both 32-bit and 64-bit versions of Office, and the changes are available in the trunk WinWord Integration plug-in. It would be great if we could get some users to test this.
    • CommentAuthorkleonard
    • CommentTimeJun 21st 2010
     
    My copy of Office 2010 Academic Pro is on the way. I'll test and report back once I get it running.
    • CommentAuthorcooljazz
    • CommentTimeJun 26th 2010
     
    I found a file at the following location:

    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?
  8.  
    cooljazz: Does this have something to do with the above? If not, start a new thread.

    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.
    • CommentAuthorcooljazz
    • CommentTimeJun 27th 2010
     
    I was having the same problem. I did a copy/paste into the startup folder like you mentioned and now I'm all good! Sorry for the confusion!
    • CommentAuthorbrigdonnwr
    • CommentTimeDec 17th 2010 edited
     
    I would also like to add the following which was the only thing to solve my problem, which also threw up the 'macro' issue. Although they discuss Office 2007, it certainly worked for me on Office 2010 (to my great relief). Obtained from http://www.eggheadcafe.com/software/aspnet/33418494/the-function-you-are-attempting-to-run-contains-macros-or-content.aspx

    "Here's the best way. Open the Control Panel, double-click Programs &
    Features, find and select Office 2007. Click on the Change button (at the
    top of the screen) and Office Setup will launch itself. Chose Add or Remove
    Features. From the list, expand Office Shared Features, click on the little
    arrow attached to Visual Basic for Applications and select the Run from My
    Computer Option. Click Continue. Setup will then install the VBA code that
    you need.

    Note that this is NOT done in Word. Word and all Office apps should be
    closed."

Zotero Forums are powered by Vanilla 1.1.5a