title: Press a button and do something based on your choosing in the dropdown menu?
body: <p>I tried with this, but it is not working, I believe the error is in around the if statement=></p>
  
  <pre><code>import tkinter as tk
  
  from docx import Document
  
  HEIGHT = 500
  WIDTH = 600
  
  root = tk.Tk()
  root.title("Generator")
  canvas = tk.Canvas(root, height=HEIGHT, width=WIDTH)
  canvas.pack()
  
  #dropdown part
  # Create a Tkinter variable
  tkvar = tk.StringVar(root)
  choices = { 'broker','consultant','recruit'}
  tkvar.set('broker') # set the default option
  popupMenu = tk.OptionMenu(root, tkvar, *choices)
  popupMenu.place(x=260,y=95)
  
  def helloCallBack():
  
     if tkvar == 'broker':
        document = Document()
        document.add_heading("broker")
        document.save('0034.docx')
  
  button = tk.Button(text="Generate", font=40, command=helloCallBack)
  button.place(x=230, y=380)
  
  root.mainloop()
  </code></pre>
  
  <p>Yes well... this is my problem, when I open the document I see no changes, or no added heading... I would like to have the documents heading changed to what I choose in the dropdown. Can anyone help?</p>
  
  <p>Kr.
  Selfiatus1</p>