How to use constant defined for VBA in VC++?

F

Frank

Hi,all

I do office developing with vc++, and the "sdk" I used is office help file
for VBA. But now, I encounter a problem, which is how to use those constants
of office developing for VBA. For example, how to use the following
constants into VC++ project.

Followings be argument used by Application.Documents.Open(...) method.

wdOpenFormatAuto, wdOpenFormatDocument, wdOpenFormatRTF,
wdOpenFormatTemplate, wdOpenFormatText, wdOpenFormatUnicodeText...


Any help is appreciated... :p
Thanx very much
--- Frank F.Han

+-----------------------------------------+
| (e-mail address removed) |
+-----------------------------------------+
 
C

Chango V.

#import Word's type library:

// Prerequisite Office (2000) type library:
#import "libid:2DF8D04C-5BFA-101B-BDE5-00AA0044DE52" version("2.1")
rename_namespace("office")
// VBA Extensibility type library:
#import "libid:0002E157-0000-0000-C000-000000000046" version("5.1")
rename_namespace("vbide")
// Word 2000 type library (internally references the two above):
#import "libid:00020905-0000-0000-C000-000000000046" version("8.1")
rename_namespace("word") \
rename("ExitWindows", "ExitWindows_")

//
 

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