astrild: (Umbrella)
Astrild ([personal profile] astrild) wrote2011-11-20 04:32 pm

Word Macro: Reformat the AO3 "Share" Code

Purpose:

At the Archive of Our Own (AO3) website, users have the option of "Sharing" links with appropriate descriptive metadata by copying code generated by the site. Unfortunately, this code isn't especially pretty. Therefore I have developed a Word Macro to quickly reformat the default "Share" code.

This Macro will:

  • Add "Title", "Author", and "Word Count" labels.
  • Add line break tags so that you can disable auto-formatting.
  • Bold all labels.
  • Change the font weight of the "Title" and "Author" from strong to normal.
  • Place the "Title", "Author", and "Word Count" on separate lines.
  • Place the "Summary" label and summary text on the same line.
  • Remove character list.
  • Remove warnings statement if no warnings apply.
  • Remove the link to the AO3 "Fandom" tag.
  • Rename the "Relationship" label to "Ship".

Example

Before

Assure Me That Your Love Is Mine (539 words) by faviconastrild Fandom: Thor (2011) Rating: Teen And Up Audiences Warning: No Archive Warnings Apply Relationships: Loki/Thor Characters: Loki (Marvel), Thor (Marvel) Summary:

Shameless fluff in which Thor is extra cuddly after sex and Loki is not. [prompt]

After

Title: Assure Me That Your Love Is Mine
Pseud: faviconastrild
Word Count: 539
Fandom: Thor (2011)
Rating: Teen And Up Audiences
Ship: Loki/Thor

Summary: Shameless fluff in which Thor is extra cuddly after sex and Loki is not. [prompt]

Archived: http://archiveofourown.org/works/258156

Word Macro Code:

Installing the Macro:

Unfortunately, I'm only familiar with Word 2007, so if you are using a different version of Word you'll need to look elsewhere for installation tips.

There's probably a faster way of installing a Macro, but I can't think of it at the moment. Sorry!

  1. Open Word 2007.
  2. Record a new (placeholder) Macro.
    1. Select the "View" tab.
    2. Find the "Macros" panel.
    3. Click the arrow under the Macros icon.
    4. Select "Record Macro".
    5. Name your Macro "AO3_Share_Fic".
    6. If you want to assign a Keyboard Shortcut to the Macro, click the keyboard icon and do so. Otherwise click "Okay".
    7. Click the arrow under the Macros icon.
    8. Select "Stop Recording".
  3. Replace the new Macro with the code I've provided.
    1. Click the arrow under the Macros icon.
    2. Select "View Macros".
    3. Highlight the Macro that you just created.
    4. Click "Edit".
    5. Copy the Macro code that I've provided in the textarea above.
    6. Highlight from "Sub AO3_Share_Fic()" to "End Sub" in your Macro editing window.
    7. Replace the highlighted code with the code I've provided. In other words: Paste!
    8. Save your Macro.
    9. Close out of the Macro editing window.
  4. Try out the Macro!

Using the Macro:

  1. Copy-Paste the "Share" code from the AO3 work page into Word.
  2. Run the Macro.
  3. You're done!