Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Macro for converting Citations to Static text?

253 views
Skip to first unread message

grammatim

unread,
Apr 28, 2009, 8:32:02 AM4/28/09
to
In order to approximate Chicago style in Word2007, I find that I need
to use "Chicago" for the in-text citations (which gets me "(name date,
page)" -- and then where necessary I can manually edit it to "name
(date, page)" -- but "Chicago" style for bibliographies is seriously
broken, so I need to use "APA" in order to get the date directly after
the author, and to get the volume editors and volume number of an
edited book in approximately correct positions. I can then convert the
bibliography to static text in order to sort the entries (they appear
within each author alphabetically by title instead of in date order).

Thus, after the document is finished, I need to set References to
"Chicago" and convert the citations to static text (to be able to keep
the format and to move the parentheses where necessary). ("APA" gives
"(name, date, p. page)".) But this can't be automated with Find/
Replace; there is no way to put "Convert to Static Text" into the
Replace box. So this is what I hope a macro can be made to do. It
seems like it ought to be a very simple Find and Act sequence.

(Then, after there are no more linked Citations, I change the
Reference style to "APA" and change the bibliography to Static Text in
order to do the sort, to insert the 3-em dashes for repeated author
name, to restore authors' first names, to deitalicize the journal
volume number (why does "APA" put spaces before the commas?), and
within a Book Section reference to move the volume editors after the
edited volume title.)

Important discovery: If the same author's name is typed in one
reference directly into the "Author" box on the New Sources panel, and
in another using the "Edit" button next to that box, Word does not
recognize them as the same person. Authors shouild thus always be
entered using the "Edit" button (since for multiple authors you need
to use it anyway).

I also once discovered that one of the listed styles will include the
"Comments" in the bibliography entry -- that's where I put Book Series
information, which is very important but not provided for at all by
Word -- but otherwise it was not compatible with Chicago style.

Yves Dhondt

unread,
Apr 28, 2009, 9:16:20 AM4/28/09
to
This might be of help:
http://bibword.codeplex.com/Wiki/View.aspx?title=Styles_FAQ#Q10

Yves
--
http://bibword.codeplex.com

"grammatim" <gram...@verizon.net> wrote in message
news:44bb9864-1415-498a...@b6g2000pre.googlegroups.com...

grammatim

unread,
Apr 28, 2009, 10:34:54 AM4/28/09
to
Yes, that will do it, thank you.

On Apr 28, 9:16 am, "Yves Dhondt" <yves.dho...@gmail.com> wrote:
> This might be of help:http://bibword.codeplex.com/Wiki/View.aspx?title=Styles_FAQ#Q10
>
> Yves
> --http://bibword.codeplex.com
>

> "grammatim" <gramma...@verizon.net> wrote in message

> > Word -- but otherwise it was not compatible with Chicago style.-

grammatim

unread,
Apr 28, 2009, 5:11:03 PM4/28/09
to
It works in the main text, but it doesn't affect footnotes (even if
the cursor is placed at the beginning of note 1, or on a Citation).

> > > Word -- but otherwise it was not compatible with Chicago style.--

Yves Dhondt

unread,
Apr 28, 2009, 5:37:23 PM4/28/09
to
Footnotes are in a different story than the main text. Just loop over the
different stories to handle them as well.

Sub CitationsToStaticText()
Dim fld As Field

For Each sr In ActiveDocument.StoryRanges
' Find all citation fields and convert them to static text.
For Each fld In sr.Fields
If fld.Type = wdFieldCitation Then
fld.Select
WordBasic.BibliographyCitationToText
End If
Next
Next

End Sub

Yves
--
http://bibword.codeplex.com

"grammatim" <gram...@verizon.net> wrote in message

news:b41cab44-9e84-4363...@z8g2000prd.googlegroups.com...

grammatim

unread,
Apr 28, 2009, 7:53:36 PM4/28/09
to
I don't know what "loop over the different stories" means. Clicking
the macro button while in a footnote results in no action. (In the
main text, the action was just slow enough to see it happen to each
entry.)

Are you saying to replace the existing macro text with the text below?

On Apr 28, 5:37 pm, "Yves Dhondt" <yves.dho...@gmail.com> wrote:
> Footnotes are in a different story than the main text. Just loop over the
> different stories to handle them as well.
>
> Sub CitationsToStaticText()
>     Dim fld As Field
>
>     For Each sr In ActiveDocument.StoryRanges
>         ' Find all citation fields and convert them to static text.
>         For Each fld In sr.Fields
>             If fld.Type = wdFieldCitation Then
>                 fld.Select
>                 WordBasic.BibliographyCitationToText
>             End If
>         Next
>     Next
>
> End Sub
>
> Yves

> > > > Word -- but otherwise it was not compatible with Chicago style.---

Yves Dhondt

unread,
Apr 29, 2009, 4:52:50 AM4/29/09
to
Yes replace it.

A Word document consists of different 'layers', called stories. You have
separate ones for the main document, headers, footers, footnotes, endnotes,
textframes, ...

In the first macro, ActiveDocument.Fields would only list the fields in the
main story, not those you put in the footnotes or endnotes. Going over each
story, as the new macro does, should solve the problem.

Yves

"grammatim" <gram...@verizon.net> wrote in message

news:e63d3efc-d9c1-426b...@y33g2000prg.googlegroups.com...

grammatim

unread,
Apr 29, 2009, 8:52:50 AM4/29/09
to
Thank you ... I won't be able to test it until the next time I finish
an article, which will be a while.

If the old one works on one story at a time, why doesn't it work on
the footnotes story when I'm in the footnotes? Various operations need
to be repeated in the footnotes after being done in the main text
(such as Find/Replace), so why shouldn't this one work the same way?

On Apr 29, 4:52 am, "Yves Dhondt" <yves.dho...@gmail.com> wrote:
> Yes replace it.
>
> A Word document consists of different 'layers', called stories. You have
> separate ones for the main document, headers, footers, footnotes, endnotes,
> textframes, ...
>
> In the first macro, ActiveDocument.Fields would only list the fields in the
> main story, not those you put in the footnotes or endnotes. Going over each
> story, as the new macro does, should solve the problem.
>
> Yves
>

> > > > > Word -- but otherwise it was not compatible with Chicago style.----

Yves Dhondt

unread,
Apr 30, 2009, 2:18:38 AM4/30/09
to
Because it doesn't focus on a specific story but rather just takes
"ActiveDocument.Fields" which is the main story. So even when in the
footnotes, I would try to convert the ones in the main text.

Yves

"grammatim" <gram...@verizon.net> wrote in message

news:5bc4d53c-b883-4301...@d25g2000prn.googlegroups.com...

0 new messages