Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enumerated values when using late binding for Office applications 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I'm trying to replace references to office so I can use late bindings and not rely on a specific version of word/excel/outlook.

However, replacing all my variable declaration to just 'Object' instead of 'Word.Application' now means the application won't compile because I have used enumetated types which now don't exist?

How do I fix this, or have I now got to simply trawl the web trying to find each enumerated types actual values.

Thanks,
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
You'll find the value of named constant in the immediate window (Ctrl-G) of the relevant application or with the Object browser (F2).

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
so if i want to know the value of a word constant, I open word, and then press F2.

And type the enumerated type where to find its value?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
and then press F2
When in VBE (Alt-F11)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Right gotcha , what you failed to say was use the ? (question mark) and then the enum type , to find its value!

it's like pulling teeth at times, but got there in the end.

Thanks PHV.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top