getting prompts in VBA code window for constants

L

Larry

In Word 97 VBA, how do I get Intellisense prompts for certain constants?

ActiveDocument.Close

For example, when I type the above code, I want to get some prompt
following it so I can choose SaveChanges, DoNot SaveChanges, or
whatever, but I see no way to have the menu appear the way it does for
other bits of code. The only way to get the exact spelling of those
constants is to go to a help file where they are listed.

Larry
 
J

Jay Freedman

Larry said:
In Word 97 VBA, how do I get Intellisense prompts for certain constants?

ActiveDocument.Close

For example, when I type the above code, I want to get some prompt
following it so I can choose SaveChanges, DoNot SaveChanges, or
whatever, but I see no way to have the menu appear the way it does for
other bits of code. The only way to get the exact spelling of those
constants is to go to a help file where they are listed.

You can't -- it's just one of many annoyances.

In this case, if you start typing wdDoN and then press Ctrl+Spacebar,
you'll get a popup that shows the complete constant, and you can hit
Tab or Enter to accept it. But you do have to know which constants
start with "wd" and which start with "mso".
 
L

Larry

That Ctrl+Spacebar is at least an improvement. Thanks.

It's odd that with all the things you can bring up in the context menu,
this is not available. There is List Constants on the context menu that
doesn't bring up anything. But then List Properties and Methods doess
brings up the same list as Ctrl+Spacebar. And I see that the constants
appear in the same master list that includes all properties and methods.

Larry






Larry
 
J

JGM

Hi Larry,

Also, as another "trick" of some sorts....

Once you get to know the most common constants, you can type them in, always
use lower case, then Word will put in the Uppercase by itself.

So, if you finish typing a line of code and you hit Enter, but there are no
upper case letters, you know something is wrong!

Cheers!

--
_______________________________________
Jean-Guy Marcil
(e-mail address removed)

Larry said:
That Ctrl+Spacebar is at least an improvement. Thanks.

It's odd that with all the things you can bring up in the context menu,
this is not available. There is List Constants on the context menu that
doesn't bring up anything. But then List Properties and Methods doess
brings up the same list as Ctrl+Spacebar. And I see that the constants
appear in the same master list that includes all properties and methods.

Larry






Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top