VBA OpenRouter translation macro for Office 2003
A VBA macro for Office 2003 that sends the selected text to OpenRouter (Claude Sonnet or Gemini) and replaces it with the model's response, using a system prompt that instructs the model to output only the translation. The author built it to streamline translating a French novel paragraph by paragraph without copying and pasting back and forth, and reports it is a major boost to translation productivity.
What it addresses
Copying and pasting paragraphs to and from OpenRouter for translation gets old fast, and Office 2003 has no AI features (its built-in translate function is awkward and not very good).
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
VBA OpenRouter translation macro for Office 2003
A VBA macro for Office 2003 that sends the selected text to OpenRouter (Claude Sonnet or Gemini) and replaces it with the model's response, using a system prompt that instructs the model to output only the translation. The author built it to streamline translating a French novel paragraph by paragraph without copying and pasting back and forth, and reports it is a major boost to translation productivity.
Problem: Copying and pasting paragraphs to and from OpenRouter for translation gets old fast, and Office 2003 has no AI features (its built-in translate function is awkward and not very good).
Audience: individual writers/translators working on personal projects
Posted by @bambax · Original source ↗
Source text · @bambax · · Source ↗
So I wrote a macro to send selected text to OpenRouter and replace with the response (with a system prompt that says to only output the translation, otherwise most models start with "Here's the translated text:")