GithubHelp home page GithubHelp logo

jddev273 / chatgpt-word-macro Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 6.0 1.1 MB

A simple Microsoft Word Macro allowing you to use ChatGTP within word through the ChatGTP API.

License: MIT License

VBA 100.00%
chatgpt gpt-3 macro macros microsoft ms openai word

chatgpt-word-macro's Introduction

ChatGPT Word Macro

A simple macro for communicating with the OpenAI ChatGPT API in Microsoft Word. This was tested under the latest version of Microsoft Word. Adjustments may be needed to run with older versions.

Demo

ChatGPT Word Macro Demo

Usage

These instructions may only apply to recent versions of Microsoft Windows. You will need

  1. Open Microsoft Word and Click View Then Macros (or Alt-F8).
  2. Enter a name (should be ChatGPT or you will need to change the macro code), make sure normal.dotm is selected in the Macros In pulldown menu then click Create.
  3. The editor will open up, replace everything with the code in the macro.vba file.
  4. Replace sk-YOUR-CHATGPT-KEY-HERE with your own OpenAI API key.
  5. Run the ChatGPT subroutine by pressing Alt-F8 and clicking run.
  6. Enter the prompt you want to send to the ChatGPT API in the input box that appears.
  7. The response from the ChatGPT API will be inserted into the document where the cursor was last placed.

Troubleshooting

If you receive an error related to WinHttp.WinHttpRequest.5.1, it means that the WinHttp library is not registered on your computer. To resolve this issue, you can try re-registering the library by running the following command in an elevated command prompt:

regsvr32 %systemroot%\system32\winhttp.dll

If the error persists, you may need to reinstall the library. You can download it from the Microsoft website.

Note

The UnescapeString function is used to format the response from the API into a human-readable format. If you encounter any errors or unexpected output, please refer to the comments in the code for further assistance.

Disclaimer

The authors and contributors of this program provide it as-is, without any warranties or guarantees. They cannot be held responsible for any damages resulting from the use of this program.

License

This program is licensed under the MIT license.

Author

Johann Dowa

chatgpt-word-macro's People

Contributors

jddev273 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

chatgpt-word-macro's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.