Hi,
I have to questions about the Bookends/Word 2011 interface.
1. Would it be possible for Bookends to include shortcuts for the Apple Script, preferably the same that are used in Mellel? (Zotero Standalone does exactly that -- the shortcuts appear in the Apple Script menu).
2. Would it be possible (via Visual Basic or Macro or whatever these things are call in M$ world) for Bookends to make Word automatically highlight every temporary citation, i.e. text between delimiters {...} in one color, but also every formatted citation in another color -- again something that we have in Mellel?
I understand that Mellel is Bookends-aware in a way that Word 2011 is not, but Bookends clearly has a way -- via AppleScript -- of talking to Word, it can even unscan a document when temp citations are hidden, so, in theory, at least, my request seems not completely insane.
Shortcuts would make the interaction much more efficient and highlights would be a tremendous help for working with the text, making sure the formatted citations look ok etc...
All best,
Toma
shortcuts + automatic highlights in word 2011
Re: shortcuts + automatic highlights in word 2011
Hi,
The way Bookends and Mellel work together is complex, requires extensive cross-talk between both apps, and was the result of a lot of work on both sides. It can't be replicated by sending AppleEvents to Word. For example, in Mellel, a citation is an object, not text, so even though it is colored, there is no color when you print. Yes, I suppose it's possible that Bookends could have Word color citations, but it would be real color (i.e. the words would not be black, but some highlight color). That would carry over when you print. Not good.
As for the shortcuts, there is a thread on this forum about how to add shortcuts to Scripts in Word. See if this is what you're looking for
viewtopic.php?f=2&t=1851&p=8440&hilit=s ... word#p8440
Jon
Sonny Software
The way Bookends and Mellel work together is complex, requires extensive cross-talk between both apps, and was the result of a lot of work on both sides. It can't be replicated by sending AppleEvents to Word. For example, in Mellel, a citation is an object, not text, so even though it is colored, there is no color when you print. Yes, I suppose it's possible that Bookends could have Word color citations, but it would be real color (i.e. the words would not be black, but some highlight color). That would carry over when you print. Not good.
As for the shortcuts, there is a thread on this forum about how to add shortcuts to Scripts in Word. See if this is what you're looking for
viewtopic.php?f=2&t=1851&p=8440&hilit=s ... word#p8440
Jon
Sonny Software
Re: shortcuts + automatic highlights in word 2011
Thanks, Jon.
Thanks for the shortcuts link -- it works. And I just realized, that's exactly what Zotero does out of the box.
Now, for my highlighting question, I am far from suggesting the type of object that one finds in Mellel. I am really talking only about highlighting -- i.e. a very superficial interaction that would be, nonetheless, very helpful when working with a long text.
In an ideal scenario, the user would be allowed to select whether he wants citations highlighted or not. If he choses to have them highlighted, two different shades of blue (like in Mellel) should automatically highlight temporary and formatted citations, i.e. as soon as a citation is entered, it gets highlighted. There should be a final option (another AppleScript?) that would toggle the highlights -- i.e. allow highlights to be removed so that the document can be printed or turned back on again...
After many years of using Mellel, I am switching back to Word 11 and would find this function very, very helpful.
All best,
Toma
Thanks for the shortcuts link -- it works. And I just realized, that's exactly what Zotero does out of the box.
Now, for my highlighting question, I am far from suggesting the type of object that one finds in Mellel. I am really talking only about highlighting -- i.e. a very superficial interaction that would be, nonetheless, very helpful when working with a long text.
In an ideal scenario, the user would be allowed to select whether he wants citations highlighted or not. If he choses to have them highlighted, two different shades of blue (like in Mellel) should automatically highlight temporary and formatted citations, i.e. as soon as a citation is entered, it gets highlighted. There should be a final option (another AppleScript?) that would toggle the highlights -- i.e. allow highlights to be removed so that the document can be printed or turned back on again...
After many years of using Mellel, I am switching back to Word 11 and would find this function very, very helpful.
All best,
Toma
Re: shortcuts + automatic highlights in word 2011
I understand. But faking citations objects (besides the fact I'm not sure how to do it
) isn't a good idea. As I said, it would require actually modifying the text. This raises all sorts of potential problems.
Jon
Sonny Software

Jon
Sonny Software
Re: shortcuts + automatic highlights in word 2011
Actually, this turned out to be pretty easy to do. Here's what I did in case somebody else is also interested.
To highlight temporary citations in a Word 2011 doc, I created a macro in Word that highlights anything it finds between citation delimiters (in my case { and }).
Тhen, in Bookends' Insert Citation Apple Script I added this at the end of the script:
Every time a new citation is entered, it gets highlighted (by the currently selected highlight color in Word.) Now, the truly cool thing is that scanning the document and generating a bibliography, will keep the formatted citations highlighted. Unscanning will revert to temp citations, and they, too, will remain highlighted.
To remove highlights before printing, select all and click on the highlighting icon in the Word toolbar and select none.
All best,
Toma
To highlight temporary citations in a Word 2011 doc, I created a macro in Word that highlights anything it finds between citation delimiters (in my case { and }).
Code: Select all
Sub test()
'
' test Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Highlight = True
With Selection.Find
.Text = "\{*\}"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Code: Select all
tell application "Microsoft Word"
activate
run VB macro macro name "test"
end tell
To remove highlights before printing, select all and click on the highlighting icon in the Word toolbar and select none.
All best,
Toma
Re: shortcuts + automatic highlights in word 2011
Toma, that's very cool. Thanks for sharing it with Bookends users and me. Hm, this makes me wonder if there might be some use to putting together a collection of Word macros for ours. If you or anyone else reading this thread has come up with useful macros for Word 2011 and would like to share them, please let me know. If there are enough, I could create a section in the forum...
Jon
Sonny Software
Jon
Sonny Software
Re: shortcuts + automatic highlights in word 2011
BTW, if we update an Apple Script in the future, the old one will be replaced automatically. So if you edit one of ours, be sure to give it a different name.ttasovac wrote: Тhen, in Bookends' Insert Citation Apple Script I added this at the end of the script:
Jon
Sonny Software