Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
developer
active.documents
automation
binary.file_format
clipboard.dde
com.add_ins
hosting.controls
internet_other
office.sdks
officedev
officedev.other
outlook.forms
outlook.vba
smarttags
vba
web.components
  
 
date: Thu, 3 Jul 2008 08:23:02 -0700,    group: microsoft.public.office.developer.automation        back       


Word Automation Compiling error   
My Dear friends,

I am building an application with Word automation, I added 3 MFC class from 
Typelib, CDocument, CDocuments and CApplication
The head file contains
#import "C:\\Program Files\\Microsoft Office\\Office12\\MSWORD.OLB" 
rename("ExitWindows","ExitWindows1") rename("FindText","FindText1") 
rename("Calculate","Calculate1")

but the compiler give a lot of similar errors for lines like below
    __declspec(property(get=GetFonts))
    WebPageFontsPtr Fonts;
    __declspec(property(get=GetCustomXMLPart))
    _CustomXMLPartPtr CustomXMLPart;
    CustomXMLNodePtr GetCustomXMLNode ( );
error C2146: syntax error : missing ';' before identifier 'Fonts'
error C4430: missing type specifier - int assumed. Note: C++ does not 
support default-int

I think I must missed some point here.

Any help would be very appreciated.
 
LeonXYZ
date: Thu, 3 Jul 2008 08:23:02 -0700   author:   LeonXYZ

RE: Word Automation Compiling error   
all  error C2146 and error C4430 are caused by msword.tlh.
It seems that a few types below are not defined:
WebPageFontsPtr,
_CustomXMLPartPtr,
CustomXMLNodePtr,
AssistantPtr,
LanguageSettingsPtr,
AnswerWizardPtr,
FileDialogPtr,
_CommandBarsPtr,
FileSearchPtr,
VBEPtr,
NewFilePtr,

Do I have to include or import some other files as well ?

Thanks a million for your help

-- 
LeonXYZ


"LeonXYZ" wrote:

> My Dear friends,
> 
> I am building an application with Word automation, I added 3 MFC class from 
> Typelib, CDocument, CDocuments and CApplication
> The head file contains
> #import "C:\\Program Files\\Microsoft Office\\Office12\\MSWORD.OLB" 
> rename("ExitWindows","ExitWindows1") rename("FindText","FindText1") 
> rename("Calculate","Calculate1")
> 
> but the compiler give a lot of similar errors for lines like below
>     __declspec(property(get=GetFonts))
>     WebPageFontsPtr Fonts;
>     __declspec(property(get=GetCustomXMLPart))
>     _CustomXMLPartPtr CustomXMLPart;
>     CustomXMLNodePtr GetCustomXMLNode ( );
> error C2146: syntax error : missing ';' before identifier 'Fonts'
> error C4430: missing type specifier - int assumed. Note: C++ does not 
> support default-int
> 
> I think I must missed some point here.
> 
> Any help would be very appreciated.
>  
> LeonXYZ
date: Thu, 3 Jul 2008 08:33:00 -0700   author:   LeonXYZ

RE: Word Automation Compiling error   
If you look at the first few lines of msword.tlh, you'll find the following 
statement:
//
// Cross-referenced type libraries:
//
//  #import "C:\Program Files\Common Files\Microsoft Shared\OFFICE12\MSO.DLL"
//  #import "C:\Program Files\Common Files\Microsoft 
Shared\VBA\VBA6\VBE6EXT.OLB"
//

So import those two files before msword.tlb please.

"LeonXYZ" wrote:

> all  error C2146 and error C4430 are caused by msword.tlh.
> It seems that a few types below are not defined:
> WebPageFontsPtr,
> _CustomXMLPartPtr,
> CustomXMLNodePtr,
> AssistantPtr,
> LanguageSettingsPtr,
> AnswerWizardPtr,
> FileDialogPtr,
> _CommandBarsPtr,
> FileSearchPtr,
> VBEPtr,
> NewFilePtr,
> 
> Do I have to include or import some other files as well ?
> 
> Thanks a million for your help
> 
> -- 
> LeonXYZ
> 
> 
> "LeonXYZ" wrote:
> 
> > My Dear friends,
> > 
> > I am building an application with Word automation, I added 3 MFC class from 
> > Typelib, CDocument, CDocuments and CApplication
> > The head file contains
> > #import "C:\\Program Files\\Microsoft Office\\Office12\\MSWORD.OLB" 
> > rename("ExitWindows","ExitWindows1") rename("FindText","FindText1") 
> > rename("Calculate","Calculate1")
> > 
> > but the compiler give a lot of similar errors for lines like below
> >     __declspec(property(get=GetFonts))
> >     WebPageFontsPtr Fonts;
> >     __declspec(property(get=GetCustomXMLPart))
> >     _CustomXMLPartPtr CustomXMLPart;
> >     CustomXMLNodePtr GetCustomXMLNode ( );
> > error C2146: syntax error : missing ';' before identifier 'Fonts'
> > error C4430: missing type specifier - int assumed. Note: C++ does not 
> > support default-int
> > 
> > I think I must missed some point here.
> > 
> > Any help would be very appreciated.
> >  
> > LeonXYZ
date: Wed, 16 Jul 2008 08:22:15 -0700   author:   fefe

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us