Word 97 WLL writen in VC++

Word 97 WLL writen in VC++

Post by Richard Gua » Thu, 11 Nov 1999 04:00:00


I am writing a Word 97 addin (WLL) in VC++ and I am trying to use this

extern "C" __declspec( dllexport ) short OnFileImport(  )
         AFX_MANAGE_STATE( AfxGetStaticModuleState() ) ;
         // some code todo,
        return 1;


I was looking at all the information on the MSDN site but I can find nothing
that can help me all the code examples are in VB and I need VC++ examples.
When I call the CommandBarControl.OnAction("OnFileImport") nothing happens,
I can use the CAPILib function RegisterFunction(...) but I would like to get
away from that and the only other way would be to declare the funtion in a
templat.dot file. I would like to know if there is a better way that I can
call the function from my WLL without having to use the above procedures.

Richard Guay, Software Developer
Infrastructures for Information Inc.
1730 St. Laurent Blvd., Suite 200
Ottawa, Ontario
Canada   K1G 5L1
613 738 3156, ext. 238(Tel)
613 738 7210 (fax)



1. MS-WORD 6.0 WLL & ODBC DLL Add-Ins


Has anyone had problems with the wbodbc.wll add in for Word 6.0 ?.

Firstly I had problems connecting to a ODBC DataSource (Borland Interbase),
although I have no problems getting to it with a Borland C++ prog.

MS gives you the source to wbodbc.wll with the Office Development Kit to
'customise' for various odbc drivers, but if I compile this, without changes,
under MSVC v1.5, then Word crashes with a GPF in the the wll when I attempt
to access it.

Do I need to compile this with v2.0 of MSVC ?, the makefile out of the box
failed under v1.5.

Thanks in Advance


  Green Door Software Ltd   Compu$erve: 100242,1003
  P.O. Box 67-107, Mt Eden, URL:        http://softcopy.com/chris
  Auckland, New Zealand.    Phone/Fax:  +64 9 376 2792

  The Auckland Warriors Rugby League Home Page:

2. Power setting in GPO

3. How to include an Access 97 Control in a Word 97 template

4. Wanted: Trade my Amiga 500 system for your PC Clone

5. VC++ driving Word 97 - table problem

6. file name to a variable

7. weird Word 6 -> Word 7 .WLL migration problem (window subclass)

8. Linking in Word 95, Opening with Word 97

9. Why does this work with Word 97 but not Word 2000

10. Convert Word CAPI WLL to an "OLE AUTOMATION" program???

11. Using SDK dialog boxes from a WLL (Word DLL)

12. Word 7 command identifiers (.WLL capi commands)