Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:37:32+00:00 2026-06-17T21:37:32+00:00

Hopefully this should be a simple one for anyone who understands COM. I have

  • 0

Hopefully this should be a simple one for anyone who understands COM. I have a VB script that uses the office spell checker to check what ever is added to the clipboard. This has been floating around for many years, but now that AutoHotkey supports COM objects I thought I would try converting it over to AHK. I don’t know much about COM, but it’s worked pretty well so far except for one line.

oWD.ActiveDocument.Close wdDoNotSaveChanges

I cannot figure out how to pass the

wdDoNotSaveChanges

constant to

oWD.ActiveDocument.Close

in AutoHotkey. If I use it as above from the VB script, I receive an “This line does not contain a recognized action” error.
Sorry again about not using proper code tags, but I am visually impaired and the post editor is not completely accessible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:37:33+00:00Added an answer on June 17, 2026 at 9:37 pm

    wdDoNotSaveChanges is an Office constant. Sometimes you can get lucky by Googling for “wdDoNotSaveChanges value”, or sometimes you have to go digging. In this case, the google answer worked so the value is 0, so you would convert your code to:

    oWD.ActiveDocument.Close(0)
    

    or the slightly more self-documented:

    oWD.ActiveDocument.Close(wdDoNotSaveChanges:=0)
    

    The latter is a good trick for all API constants but you have to know where to look for the values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should hopefully be a simple one. When using a date time picker in
This should hopefully be a simple one. I am trying to learn about the
This should hopefully be a simple one. I would like to add an extension
Hopefully this should be a simple one... Here is my test.sh file: #!/bin/bash patch_file=/home/my
Have a query that should hopefully be nice and simple to answer. I have
hopefully this should be a quick and simple one, using PHP I'm trying to
This should hopefully be a simple one. I am serializaing a List<> of C#
Hopefully this is simple: I have a relatively long list where each list item
Hopefully this is less complex than I think. I have one table of companies,
It seems that this should be a simple thing but I can't figure it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.