top of page
Search

Enhance Your Job Applications with OpenAI: A Powerful Job Application Helper for Word

  • Writer: Mark Stankevicius
    Mark Stankevicius
  • Apr 27, 2024
  • 13 min read

Updated: Jan 5

Splash image for blog post of someone creating a resume

Introduction to OpenAI job application helper in Word

In today's highly competitive job market, it's essential to stand out from the crowd when applying for jobs. The traditional resume and cover letter may not be enough to make a lasting impression on potential employers. However, with the advent of OpenAI, a powerful language model, you can now enhance your job applications and increase your chances of landing your dream job. OpenAI can assist you in crafting compelling resumes, personalized job applications, and provide you with valuable insights to make your job applications more effective.

In this step-by-step tutorial, I will show you how to create an automated job application helper powered by Generative AI using OpenAI APIs and integrated into Microsoft Word. Think of it as providing AI resume analysis.

The automated job application helper will perform two functions:

  1. Compare your resume to the job description and look for differences in the terminology used so that you can better align your resume to the job description.

  2. List skills and experience that the job description contains that is missing from your resume.  

Of course, you should not be adding skills or experience to your resume that you do not possess.  However, there are often slight differences in terminology used, but the meaning is the same.  Aligning the terms makes it easier for the automated ATS (Applicant Tracking System) to find the relevant skills and for the recruiter to quickly scan your resume and determine if you have the desired skills and experience. Companies and recruiters now use AI tools to do automated AI resume matching. Anything you can do to make the recruiter's job easier will benefit you in landing that new role. Additionally, we are limited to how much detail to list when crafting concise but relevant resumes. Therefore, there may be instances that you have the relevant skills or experience that the job posting requires, but you did not list it on your resume due to space limitations. This AI resume analyzer will aid you in identifying additional skills & experience you possess that you should add to your resume for a particular job posting.

You can combine this job application helper with an automated cover letter generator which I have described in another blog post: How to create an AI Cover Letter generator with OpenAI APIs and Word.

Both macros can be added to the same Word document that you use as a basis for using OpenAI to enhance your job application process.


The power of OpenAI in job applications

OpenAI is a cutting-edge artificial intelligence technology that has revolutionized many industries, and job applications are no exception. With its advanced natural language processing capabilities, OpenAI can help you write persuasive and engaging content that captures the attention of hiring managers and recruiters. By leveraging OpenAI's powerful algorithms, you can create resumes and cover letters highlighting your skills, experiences, and achievements in the most compelling way possible. Using OpenAI APIs in Word can provide you with a personal resume analyzer. Generative AI powered by OpenAI can also assist you in tailoring your application materials to match specific job requirements, giving you a competitive edge over other applicants.


Introduction to the OpenAI (ChatGPT) API

The ChatGPT API empowers developers to incorporate the model’s capabilities into their applications, enabling programmatic text generation. Accessing the API is straightforward, allowing for the creation of ChatGPT resume and job description comparison prompts that ChatGPT can respond to with precision.

ChatGPT's capabilities are based on its ability to predict the next word or phrase given a prompt. By leveraging this capability, we can provide ChatGPT with a prompt to have OpenAI compare our resume to the job description and provide some beneficial feedback.

The OpenAI API offers several ways to interact with the model, including the chat/completions API, which suits our resume analysis needs. By understanding how the OpenAI API works, we can seamlessly integrate the AI capabilities into our Word Macro to create a ChatGPT job application helper.


Using OpenAI to enhance your resume

Your resume is the first impression you make on potential employers, and it is crucial to make it count. With OpenAI, you can transform your resume from a mundane list of experiences into a compelling narrative that showcases your skills and accomplishments. OpenAI can help you craft powerful bullet points highlighting your achievements, tailor your resume to match specific job descriptions, and provide suggestions to improve the overall structure and content. By leveraging the power of OpenAI, you can create a resume that stands out from the competition and grabs the attention of hiring managers.

 

Prereqs for these Step-by-Step instructions

There are several requirements for you to automate the calling of OpenAI APIs in a Word document. They are the following:

  1. An OpenAI API account: You will need access to the OpenAI APIs to call them directly from the Word Macros, which doesn’t require a ChatGPT Plus account but does necessitate an OpenAI API plan. You can find more details here: https://openai.com/product. The pricing model is quite affordable, based on the number of tokens utilized. Create an account before you begin the steps in this document.

  2. Familiarity with programming with Visual Basic macros in Microsoft Word: The OpenAI API will be called from a macro in the Word document. Therefore, some familiarity with programming would be helpful to ensure you can set up the environment and correctly copy the code for the ChatGPT Job Application Helper.

  3. Access to Microsoft Word: I used “Microsoft® Word for Microsoft 365 MSO (Version 2402)” in these step-by-step instructions. Some steps may vary depending on your version, but the general approach will apply.

  4. Macro-enabled Word document: The default Word document type does not allow macros to be invoked for security reasons. You must use a “Microsoft Word Macro-Enabled Document,” which allows you to create and add macros.

Important Note: Enabling macros in Word documents could introduce malicious code. Some Malware is distributed via VB macros. In addition to the code I have written and provided, I use two other VBA macro libraries: VBA-JSON and VBA-Dictionary. I scanned both libraries with VB malware scanners and found no indication of malicious code.


Step-by-step tutorial on creating an automated resume analyzer in Word

Now that we have a basic understanding of job application helper and the tools involved let's dive into the step-by-step tutorial on how to integrate the tool into Word.

In this automated resume analyzer, I used a resume and a job description as input. To allow the input for the resume and job description, I had to define a format that the VBA macro would understand and enable the macro to find both inputs.  The format that the macro will be looking for is a set of delimiters in the document that indicate where the Resume starts and ends and where the Job description starts and ends. 

The basic format is the following:


Word document format required for VBA automation

  • The VBA code will search and find the Resume start and end markers of “Resume:” and “Resume end”. It will also search and find the Job Description markers of “Job description:” and “Job description end”.  Any text between these delimiters will be considered input to the Resume and the Job Description, respectively.   Replace the text in red with the appropriate input text for the generation.  This approach allows you to input your Resume once and effortlessly update the job description for each job application.


Step 1: Setting up Word Macros for calling APIs

We must set up a Word document with macro support to interact with the OpenAI API. A Word Macro is a set of instructions that automates repetitive tasks in Word. In this case, we will use the Macro programmed in Visual Basic to invoke the OpenAI API and generate the resume analysis text.

To set up the Visual Basic Word macro, follow these steps:

1) Open Word and navigate to the "Developer" tab.

2) If you do not see the "Developer" tab in Word, add it to your view. It is not shown by default in the tabs in Word.

3) To add the “Developer” tab, navigate to “File” --> “Options” --> “Customize Ribbon”.

Customize ribbon UI to add Developer tab

4) Check the “Developer” Tab box and click “OK”.

UI in Word showing checkbox for adding "Developer" tab

5) Now you should see the “developer” tab on your Ribbon.

Word toolbar showing "developer" tab being visible

6) The “developer” tab opens the Visual Basic Editor, which allows you to create Visual Basic macros to call OpenAI APIs. The steps to create and invoke the macro in the Word document are below.

With the Developer tab now in place, we're poised to integrate the OpenAI API in the subsequent phases of our setup.



Step 2: Setting up the VBA code to Invoke the OpenAI API

1)  Open Word and navigate to the "Developer" tab.

2) Click on "Visual Basic” to open the Microsoft Visual Basic for Applications (VBA) editor.   This will open the VBA editor and allow you to create the macro needed to call the API.

Word UI Developer tab showing Visual Basic selection

3)  On the top toolbar of the VBA editor, select “Insert” --> “Module” to open an empty module creation window.  You will want to copy the VBA code shown in the GitHub link below into this empty module window.  Copy and paste all the VB code into the new module.

4)  Rename the module in the VBA editor window by choosing “View”--> “Properties Window” which will open the properties for this new module.  Notice it is initially named “Module1”.  In the Properties window, choose a more meaningful name. I have chosen JobApplHelper.

Image showing VBA editor listing module JobApplHelper

5)  The “JsonConverter” module is also used in this code and must be inserted and referenced for the macro code to run correctly.  It is used to parse the response returned from the API.  If you do not import this module, you will receive a “Run-time error ‘424’ Object required”. Which indicates that the module cannot be found.  The instructions for installing this module can be found on the Readme page of that module's GitHub URL.  Import it using “File” --> “Import File” on the VBA editor toolbar.

6)  The "JsonConverter" library also depends on “VBA-dictionary”.  I also used the VBA Dictionary and imported it into the VBA editor. Download the zip file and extract it to a local folder. Then, import the “dictionary.cls” file into your VBA project using steps similar to those above. Once you have imported the JsonConverter and the Dictionary file, you will see the following in the VBA editor.

Image of VBA editor displaying JsonConverter and Dictionary modules

 

There are a couple of things to note in the VBA macro:

  • The default model (LLMs - Large Language Models) used in the text generation is “gpt-4o-mini”. You can change this to use other models of your choice. The API called to generate the text is the chat/completions API. This API is compatible with a specific list of language models, which changes over time. I recommend checking the OpenAI website to ensure you use a compatible model.

  • There are two crucial lines of code that instructs OpenAI on the desired behavior. Both these lines set the value in the systemPrompt variable. This directive is a key part of the ChatGPT on what type of comparison the Generative AI code will perform on the two input documents. I’ve found them to be effective in guiding OpenAI in producing the kind of output I desired. While you can modify these instructions, make sure they clearly communicate to OpenAI that both the Resume and Job description are included in the chat input.

  • There is error handling to ensure the resume and job description text are found. If something is missing in the document, or the API call has errors, messages will be sent to the Word UI or inserted into the document.


Step 3: Setting up the API key to call the OpenAI API

You’re getting close to the step where you can run the macro. There are just a few more steps that need to be done, and you will be ready to try it out.

1)  Copy your API key from the OpenAI API account site into the code.  The Macro will make an API call to the OpenAI endpoint, retrieve the generated content, and insert it into your Word document.  Login to your OpenAI API account that you created in the Prereqs step and access the API key tab in the menu or use this API Key link:

OpenAI API UI showing access to API Keys

2)  In the API keys UI, click the “Create new secret key” button to create a new API key for the API call. 

OpenAI API keys tab showing how to create new secret key

 

3) Once the API key is created, copy the API key into the indicated line of macro code shown below. Carefully replace the placeholder with your unique key to ensure secure access to the OpenAI API from your personal account. Remember, this key is confidential and should not be shared, as it serves as your exclusive access to your account.

Image showing where to insert your API key in the VBA code

       

Step 4: Running and testing the Macro call to ChatGPT API

1)  Now that you have the VBA macro created and using your API key, you can test the macro and ensure it is set up properly.  Ensure you have copied a resume and job description between the delimiters in the document. If the document is ready, go to the quick access toolbar and click "View Macros".

image showing how to View Macros in Word document

2)  If you do not see the “View Macros” on the quick access toolbar you will need to choose “File” --> “Options” --> “Quick AccessToolbar” and add “Macros”.

3)  Once you can view the macros, a window with the macros in your document will open, as indicated below. Select “Run” for the macro JobApplHelper (you may have named your macro differently than shown), to run the macro on the currently open document.

Word UI indicating how to run the Macro named "JobApplHelper"

4)  If the macro call to ChatGPT is successful, the Word document will have new text inserted at the end of any existing text. It will first generate the list of differences in the terminology used and then list skills, experience, and qualifications that your resume is missing that the job description lists.  I have included a screenshot of a partial example below:


Example view of the Word document with the generated text inserted

If no text is generated, check if an error message indicates possible problems. If there are errors, check the steps above to ensure that all actions have been implemented properly, or review the Error Resolution section below to help address the problem.


Tip: The OpenAI chat/completions request body has a couple of parameters you can modify to try different outputs and determine which provides the best results. These are the "temperature", "top_p", “frequency_penalty”, and “presence_penalty” parameters. A detailed description of these parameters can be found in the OpenAI API documentation for Chat completions API.  To view the values I used, check the VBA code for the setting that provided the desired output.

Tip: As I mentioned earlier, you can add other macros to the same Word document. For example, you can use the cover letter generator macro I reference in this other blog post:  How to create an AI Cover Letter generator with OpenAI APIs and Word. If you add this other macro to the document, you have the convenience of using the same job description and resume as input. The "View Macros" would look like the following:

Image of View Macros with two macros listed

This provides you with a compelling set of tools to aid your job search all in one Word document. I would suggest you use the two macros in the following order:

  1. Run the JobApplHelper macro first to determine if you want to make any changes to your resume and update it to better align with the job requirements.

  2. Run the GenCoverLetter macro using your new resume text to create the most helpful cover letter using your latest resume improvements.


Lastly, remember to copy the text for the cover letter and your resume updates into other Word documents for your resume and cover letter. Don't send a macro-enabled version of a Word document for the job application.


Tips for using OpenAI effectively in job applications

While OpenAI is a powerful tool, it's essential to use it effectively to maximize its benefits in your job applications. Here are some tips to help you get the most out of OpenAI:

  1. Familiarize yourself with the OpenAI and its possible variations in the output:  Take the time to explore the different types of output you can generate by modifying the prompt used or the values for the chat/completions parameters.  Understanding how to use the resume analyzer effectively will enable you to leverage its full potential.

  2. Customize the generated content: While OpenAI can generate high-quality content, it's crucial to customize it to reflect your unique experiences and skills. Tailor the suggestions provided by OpenAI to align with your personal brand and career goals.

  3. Proofread and edit: OpenAI is a powerful writing assistant, but it's not infallible.  Do not just cut and paste some of the suggested items into your resume without proofreading and editing the content generated by OpenAI to ensure accuracy and consistency.

  4. Use OpenAI as a guide, not a crutch: OpenAI is a helpful tool, but it should not replace your critical thinking and creativity. Use OpenAI as a guide to enhance your writing, but make sure your voice and personality shine through.


Potential drawbacks and limitations of OpenAI in job applications

While OpenAI is a powerful tool for a resume analyzer, knowing its limitations and potential drawbacks is essential. One limitation is that OpenAI relies heavily on the quality of the input it receives. If the input is flawed or unclear, the generated content may not be accurate or effective. Additionally, OpenAI's suggestions may not always align with your style or preferences, requiring careful customization. Finally, there is a risk of over-reliance on OpenAI, which can undermine your creativity and critical thinking skills. It's essential to balance leveraging OpenAI's capabilities and maintaining your unique voice in your job applications. You will note this is not an automated AI resume builder based on a job description. The approach this resume analyzer uses is based on the assumption you already have a resume created. Using OpenAI or any Generative AI as an automated AI resume builder based on job description would justify it's own blog post.


Conclusion and final thoughts on using OpenAI as a job application helper

OpenAI is a powerful tool that can significantly enhance your job applications. By integrating OpenAI into Microsoft Word, you can create compelling and personalized application materials that increase your chances of success. However, it's important to use OpenAI effectively, taking into account its limitations and customizing its suggestions to align with your unique skills and experiences. Ultimately, OpenAI is a valuable job application helper that can empower you to stand out from the competition and secure your dream job.


Explore the power of OpenAI in your job applications today and take your career to new heights! Integrate the Job Application Helper Macro into Microsoft Word and unlock a world of possibilities in crafting compelling resumes. Don't miss this opportunity to enhance your job applications with OpenAI's cutting-edge technology.


Error resolution

There are a few possible problems you may encounter when running the generator. Below are some error conditions and possible resolutions:

  • Truncation of the generated text: If the generated text is truncated before it ends properly, it’s likely due to the number of tokens specified in the request. To address this issue, increase the number in the parameter “max_tokens” on the requestData.

  • Invalid JSON in request: If you encounter the error below, there is a problem with the JSON used as input to the chat/completions request.  A possible cause may be that the text extracted from the resume or the job description has hidden ASCII characters. The function VBA “CleanText” removes some hidden ASCII characters, such as line feeds, but your text may have other characters causing issues in the JSON string.  To determine if this is the cause of the problem, you can display the hidden characters in the document with “File” --> “Options” --> “Display” and then check the “Show all formatting marks”.  This will display the formatting in the document.  If you have additional formatting characters not already handled by the “CleanText” function, you will need to add code to remove the additional ASCII characters.

Image of error indicating invalid JSON in request body

  • API Key error: If you see the following error, it indicates that you have inserted the incorrect API key or that the API key is missing. Check that the API key is inserted into the proper location, as shown in Step 3.3 above, and that it is the exact key from your OpenAI account. The variable OpenAI_Api_Key must contain your API key.

Image of error indicating you used an invalid API key

  • Invalid request error: If you see the following error, it indicates that you are trying to call an invalid API name. An API does not exist by that name, so it returns the 404 error. Make sure you are using the correct name for the API in the url variable.

Image of 404 error in Word document


Comments


bottom of page