MS Office Excel COM Interface Constants

Helpful script writing tricks and HowTo's
User avatar
jeeswg
Posts: 1528
Joined: 19 Dec 2016, 01:58
Location: UK

MS Office Excel COM Interface Constants

01 Jul 2017, 10:33

[2051 constants (via OfficeInfo.ahk)]
[ms office constants (excel).ahk]
jeeswg/AutoHotkey-scripts: AutoHotkey scripts
https://github.com/jeeswg/AutoHotkey-scripts

see also:
MS Office Word COM Interface Constants - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=33915

==================================================

A script to look for variables that start with 'xl' or 'wd', and retrieve their contents, to check if they are defined or blank.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



==================================================

Using OfficeInfo.ahk by kon, and ImportTypeLib.ahk by maul.esel, you can create an object with lots of MS Office constants and their values (in my case 10343 constants), which you can use to get the value for a particular MS Office constant. (Tested with MS Office 2007.)

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



==================================================

Re. True and False:

Excel COM Help - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=33673&p=156354#p156354

Excel (sheets): True:1, False:0
Excel (VBA/macro): True:-1, False:0

In my experience, (numbers are roughly estimated)
  • 1 Works 90% of the time
  • -1 Works 99% of the time
  • ComObj(0xB,-1) works when the other two fail.

MS Office COM Basics - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=8978&p=111484#p111484
Classic VB - Why is TRUE equal to -1 and not 1?-VBForums
http://www.vbforums.com/showthread.php?405047-Classic-VB-Why-is-TRUE-equal-to-1-and-not-1
Last edited by jeeswg on 03 Jul 2017, 20:31, edited 13 times in total.
User avatar
jeeswg
Posts: 1528
Joined: 19 Dec 2016, 01:58
Location: UK

Re: MS Office COM Interface Constants (as libraries)

01 Jul 2017, 10:34

[2051 constants (via OfficeInfo.ahk)]
[ms office constants (excel).ahk]
jeeswg/AutoHotkey-scripts: AutoHotkey scripts
https://github.com/jeeswg/AutoHotkey-scripts

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 4 guests