This VBA macro allows you to interact with the ChatGPT 4o, 4o mini, or 3.5 Turbo models directly from within Microsoft Word. Simply select the text you want to send to ChatGPT, and the macro will retrieve the response and insert it into your document.
"INSERTAPIKEYHERE" with your actual OpenAI API key.The macro(s) can now be used:
GPT4o, GPT4omini, or GPT35Turbo macro.For a streamlined experience, add macro button to the Quick Access Toolbar.
Customise Ribbon....Macros in the Choose commands from: dropdown menu.Home, click New Group, click Rename... and rename the group (e.g. ChatGPT).Add >>, and repeat as required.Rename..., and rename appropriately (e.g. GPT-3.5 Turbo). Repeat as required.OK to close the window.A new group will appear in the Ribbon's Home tab.
If you encounter any issues, check the following:
If the problem persists, you can view the full API response in Visual Basic Editor by pressing Ctrl + G and running the macro again. This information can assist in diagnosing any remaining issues.
If you find any bugs or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
Use of this repository and its contents (Application) is solely at your own risk. Do not use this Application on mission critical hardware or in sensitive cybersecurity environments. The developer is not responsible for any loss, damage, or disruption caused by the use of this Application, including but not limited to data loss, system failures, hardware damage, or any other consequences, including those arising due to negligence. This Application is provided "as is" without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement, except as required by Australian law. By using this Application, you agree to these terms and to hold the developer harmless from and indemnify the developer against any and all claims, demands, losses, damages, costs, and expenses (including solicitor's fees) arising out of or in connection with your use of the Application. The developer is additionally not responsible for the creation of black holes, accidental or otherwise.
This repository references Microsoft Office and ChatGPT, both of which are the exclusive property of Microsoft Corporation and OpenAI respectively. Microsoft Office, Microsoft Word, and any associated trademarks or logos are the intellectual property of Microsoft Corporation and are used herein solely for informational and referential purposes. ChatGPT, GPT-4o, GPT-4o mini, GPT-3.5 Turbo, and any associated trademarks or logos are the intellectual property of OpenAI and are used herein solely for informational and referential purposes. The developer of this Application is not affiliated with, endorsed by, or in any way officially connected to Microsoft Corporation or OpenAI.