/*** Autogenerated by WIDL 11.0 from ../wine-11.0/include/tom.idl - Do not edit ***/

#ifdef _WIN32
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include <rpc.h>
#include <rpcndr.h>
#endif

#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif

#ifndef __tom_h__
#define __tom_h__

/* Forward declarations */

#ifndef __ITextDocument_FWD_DEFINED__
#define __ITextDocument_FWD_DEFINED__
typedef interface ITextDocument ITextDocument;
#ifdef __cplusplus
interface ITextDocument;
#endif /* __cplusplus */
#endif

#ifndef __ITextDocument2Old_FWD_DEFINED__
#define __ITextDocument2Old_FWD_DEFINED__
typedef interface ITextDocument2Old ITextDocument2Old;
#ifdef __cplusplus
interface ITextDocument2Old;
#endif /* __cplusplus */
#endif

#ifndef __ITextRow_FWD_DEFINED__
#define __ITextRow_FWD_DEFINED__
typedef interface ITextRow ITextRow;
#ifdef __cplusplus
interface ITextRow;
#endif /* __cplusplus */
#endif

#ifndef __ITextDocument2_FWD_DEFINED__
#define __ITextDocument2_FWD_DEFINED__
typedef interface ITextDocument2 ITextDocument2;
#ifdef __cplusplus
interface ITextDocument2;
#endif /* __cplusplus */
#endif

#ifndef __ITextRange_FWD_DEFINED__
#define __ITextRange_FWD_DEFINED__
typedef interface ITextRange ITextRange;
#ifdef __cplusplus
interface ITextRange;
#endif /* __cplusplus */
#endif

#ifndef __ITextSelection_FWD_DEFINED__
#define __ITextSelection_FWD_DEFINED__
typedef interface ITextSelection ITextSelection;
#ifdef __cplusplus
interface ITextSelection;
#endif /* __cplusplus */
#endif

#ifndef __ITextRange2_FWD_DEFINED__
#define __ITextRange2_FWD_DEFINED__
typedef interface ITextRange2 ITextRange2;
#ifdef __cplusplus
interface ITextRange2;
#endif /* __cplusplus */
#endif

#ifndef __ITextSelection2_FWD_DEFINED__
#define __ITextSelection2_FWD_DEFINED__
typedef interface ITextSelection2 ITextSelection2;
#ifdef __cplusplus
interface ITextSelection2;
#endif /* __cplusplus */
#endif

#ifndef __ITextFont_FWD_DEFINED__
#define __ITextFont_FWD_DEFINED__
typedef interface ITextFont ITextFont;
#ifdef __cplusplus
interface ITextFont;
#endif /* __cplusplus */
#endif

#ifndef __ITextPara_FWD_DEFINED__
#define __ITextPara_FWD_DEFINED__
typedef interface ITextPara ITextPara;
#ifdef __cplusplus
interface ITextPara;
#endif /* __cplusplus */
#endif

#ifndef __ITextStoryRanges_FWD_DEFINED__
#define __ITextStoryRanges_FWD_DEFINED__
typedef interface ITextStoryRanges ITextStoryRanges;
#ifdef __cplusplus
interface ITextStoryRanges;
#endif /* __cplusplus */
#endif

/* Headers for imported files */

#include <oaidl.h>
#include <ocidl.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef WINE_NO_UNICODE_MACROS
#undef FindText
#endif
typedef enum tagTomConstants {
    tomFalse = (int)0,
    tomTrue = (int)-1,
    tomUndefined = (int)-9999999,
    tomToggle = (int)-9999998,
    tomAutoColor = (int)-9999997,
    tomDefault = (int)-9999996,
    tomSuspend = (int)-9999995,
    tomResume = (int)-9999994,
    tomApplyNow = (int)0,
    tomApplyLater = (int)1,
    tomTrackParms = (int)2,
    tomCacheParms = (int)3,
    tomApplyTmp = (int)4,
    tomDisableSmartFont = (int)8,
    tomEnableSmartFont = (int)9,
    tomUsePoints = (int)10,
    tomUseTwips = (int)11,
    tomBackward = (int)0xc0000001,
    tomForward = (int)0x3fffffff,
    tomMove = (int)0,
    tomExtend = (int)1,
    tomNoSelection = (int)0,
    tomSelectionIP = (int)1,
    tomSelectionNormal = (int)2,
    tomSelectionFrame = (int)3,
    tomSelectionColumn = (int)4,
    tomSelectionRow = (int)5,
    tomSelectionBlock = (int)6,
    tomSelectionInlineShape = (int)7,
    tomSelectionShape = (int)8,
    tomSelStartActive = (int)1,
    tomSelAtEOL = (int)2,
    tomSelOvertype = (int)4,
    tomSelActive = (int)8,
    tomSelReplace = (int)16,
    tomEnd = (int)0,
    tomStart = (int)32,
    tomCollapseEnd = (int)0,
    tomCollapseStart = (int)1,
    tomClientCoord = (int)256,
    tomNone = (int)0,
    tomSingle = (int)1,
    tomWords = (int)2,
    tomDouble = (int)3,
    tomDotted = (int)4,
    tomDash = (int)5,
    tomDashDot = (int)6,
    tomDashDotDot = (int)7,
    tomWave = (int)8,
    tomThick = (int)9,
    tomHair = (int)10,
    tomLineSpaceSingle = (int)0,
    tomLineSpace1pt5 = (int)1,
    tomLineSpaceDouble = (int)2,
    tomLineSpaceAtLeast = (int)3,
    tomLineSpaceExactly = (int)4,
    tomLineSpaceMultiple = (int)5,
    tomAlignLeft = (int)0,
    tomAlignCenter = (int)1,
    tomAlignRight = (int)2,
    tomAlignJustify = (int)3,
    tomAlignDecimal = (int)3,
    tomAlignBar = (int)4,
    tomAlignInterWord = (int)3,
    tomAlignInterLetter = (int)4,
    tomAlignScaled = (int)5,
    tomAlignGlyphs = (int)6,
    tomAlignSnapGrid = (int)7,
    tomSpaces = (int)0,
    tomDots = (int)1,
    tomDashes = (int)2,
    tomLines = (int)3,
    tomThickLines = (int)4,
    tomEquals = (int)5,
    tomTabBack = (int)-3,
    tomTabNext = (int)-2,
    tomTabHere = (int)-1,
    tomListBullet = (int)1,
    tomListNumberAsArabic = (int)2,
    tomListNumberAsLCLetter = (int)3,
    tomListNumberAsUCLetter = (int)4,
    tomListNumberAsLCRoman = (int)5,
    tomListNumberAsUCRoman = (int)6,
    tomListNumberAsSequence = (int)7,
    tomListParentheses = (int)0x10000,
    tomListPeriod = (int)0x20000,
    tomListPlain = (int)0x30000,
    tomCharacter = (int)1,
    tomWord = (int)2,
    tomSentence = (int)3,
    tomParagraph = (int)4,
    tomLine = (int)5,
    tomStory = (int)6,
    tomScreen = (int)7,
    tomSection = (int)8,
    tomColumn = (int)9,
    tomRow = (int)10,
    tomWindow = (int)11,
    tomCell = (int)12,
    tomCharFormat = (int)13,
    tomParaFormat = (int)14,
    tomTable = (int)15,
    tomObject = (int)16,
    tomMatchWord = (int)2,
    tomMatchCase = (int)4,
    tomMatchPattern = (int)8,
    tomUnknownStory = (int)0,
    tomMainTextStory = (int)1,
    tomFootnotesStory = (int)2,
    tomEndnotesStory = (int)3,
    tomCommentsStory = (int)4,
    tomTextFrameStory = (int)5,
    tomEvenPagesHeaderStory = (int)6,
    tomPrimaryHeaderStory = (int)7,
    tomEvenPagesFooterStory = (int)8,
    tomPrimaryFooterStory = (int)9,
    tomFirstPageHeaderStory = (int)10,
    tomFirstPageFooterStory = (int)11,
    tomNoAnimation = (int)0,
    tomLasVegasLights = (int)1,
    tomBlinkingBackground = (int)2,
    tomSparkleText = (int)3,
    tomMarchingBlackAnts = (int)4,
    tomMarchingRedAnts = (int)5,
    tomShimmer = (int)6,
    tomWipeDown = (int)7,
    tomWipeRight = (int)8,
    tomAnimationMax = (int)8,
    tomLowerCase = (int)0,
    tomUpperCase = (int)1,
    tomTitleCase = (int)2,
    tomSentenceCase = (int)4,
    tomToggleCase = (int)5,
    tomReadOnly = (int)0x100,
    tomShareDenyRead = (int)0x200,
    tomShareDenyWrite = (int)0x400,
    tomPasteFile = (int)0x1000,
    tomCreateNew = (int)0x10,
    tomCreateAlways = (int)0x20,
    tomOpenExisting = (int)0x30,
    tomOpenAlways = (int)0x40,
    tomTruncateExisting = (int)0x50,
    tomRTF = (int)0x1,
    tomText = (int)0x2,
    tomHTML = (int)0x3,
    tomWordDocument = (int)0x4,
    tomBold = (int)0x80000001,
    tomItalic = (int)0x80000002,
    tomUnderline = (int)0x80000004,
    tomStrikeout = (int)0x80000008,
    tomProtected = (int)0x80000010,
    tomLink = (int)0x80000020,
    tomSmallCaps = (int)0x80000040,
    tomAllCaps = (int)0x80000080,
    tomHidden = (int)0x80000100,
    tomOutline = (int)0x80000200,
    tomShadow = (int)0x80000400,
    tomEmboss = (int)0x80000800,
    tomImprint = (int)0x80001000,
    tomDisabled = (int)0x80002000,
    tomRevised = (int)0x80004000,
    tomNormalCaret = (int)0,
    tomKoreanBlockCaret = (int)0x1,
    tomIncludeInset = (int)0x1,
    tomIgnoreCurrentFont = (int)0,
    tomMatchFontCharset = (int)0x1,
    tomMatchFontSignature = (int)0x2,
    tomCharset = (int)0x80000000,
    tomRE10Mode = (int)0x1,
    tomNoIME = (int)0x80000,
    tomSelfIME = (int)0x40000
} tomConstants;
#ifndef __ITextRange_FWD_DEFINED__
#define __ITextRange_FWD_DEFINED__
typedef interface ITextRange ITextRange;
#ifdef __cplusplus
interface ITextRange;
#endif /* __cplusplus */
#endif

#ifndef __ITextSelection_FWD_DEFINED__
#define __ITextSelection_FWD_DEFINED__
typedef interface ITextSelection ITextSelection;
#ifdef __cplusplus
interface ITextSelection;
#endif /* __cplusplus */
#endif

#ifndef __ITextStoryRanges_FWD_DEFINED__
#define __ITextStoryRanges_FWD_DEFINED__
typedef interface ITextStoryRanges ITextStoryRanges;
#ifdef __cplusplus
interface ITextStoryRanges;
#endif /* __cplusplus */
#endif

/*****************************************************************************
 * ITextDocument interface
 */
#ifndef __ITextDocument_INTERFACE_DEFINED__
#define __ITextDocument_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8cc497c0-a1df-11ce-8098-00aa0047be5d")
ITextDocument : public IDispatch
{
    virtual HRESULT STDMETHODCALLTYPE GetName(
        BSTR *pName) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSelection(
        ITextSelection **ppSel) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStoryCount(
        LONG *pCount) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStoryRanges(
        ITextStoryRanges **ppStories) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSaved(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSaved(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDefaultTabStop(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDefaultTabStop(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE New(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Open(
        VARIANT *pVar,
        LONG Flags,
        LONG CodePage) = 0;

    virtual HRESULT STDMETHODCALLTYPE Save(
        VARIANT *pVar,
        LONG Flags,
        LONG CodePage) = 0;

    virtual HRESULT STDMETHODCALLTYPE Freeze(
        LONG *pCount) = 0;

    virtual HRESULT STDMETHODCALLTYPE Unfreeze(
        LONG *pCount) = 0;

    virtual HRESULT STDMETHODCALLTYPE BeginEditCollection(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE EndEditCollection(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Undo(
        LONG Count,
        LONG *prop) = 0;

    virtual HRESULT STDMETHODCALLTYPE Redo(
        LONG Count,
        LONG *prop) = 0;

    virtual HRESULT STDMETHODCALLTYPE Range(
        LONG cp1,
        LONG cp2,
        ITextRange **ppRange) = 0;

    virtual HRESULT STDMETHODCALLTYPE RangeFromPoint(
        LONG x,
        LONG y,
        ITextRange **ppRange) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d)
#endif
#else
typedef struct ITextDocumentVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextDocument *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextDocument *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextDocument *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextDocument *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextDocument *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextDocument *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextDocument *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextDocument methods ***/
    HRESULT (STDMETHODCALLTYPE *GetName)(
        ITextDocument *This,
        BSTR *pName);

    HRESULT (STDMETHODCALLTYPE *GetSelection)(
        ITextDocument *This,
        ITextSelection **ppSel);

    HRESULT (STDMETHODCALLTYPE *GetStoryCount)(
        ITextDocument *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *GetStoryRanges)(
        ITextDocument *This,
        ITextStoryRanges **ppStories);

    HRESULT (STDMETHODCALLTYPE *GetSaved)(
        ITextDocument *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSaved)(
        ITextDocument *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetDefaultTabStop)(
        ITextDocument *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetDefaultTabStop)(
        ITextDocument *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *New)(
        ITextDocument *This);

    HRESULT (STDMETHODCALLTYPE *Open)(
        ITextDocument *This,
        VARIANT *pVar,
        LONG Flags,
        LONG CodePage);

    HRESULT (STDMETHODCALLTYPE *Save)(
        ITextDocument *This,
        VARIANT *pVar,
        LONG Flags,
        LONG CodePage);

    HRESULT (STDMETHODCALLTYPE *Freeze)(
        ITextDocument *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *Unfreeze)(
        ITextDocument *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *BeginEditCollection)(
        ITextDocument *This);

    HRESULT (STDMETHODCALLTYPE *EndEditCollection)(
        ITextDocument *This);

    HRESULT (STDMETHODCALLTYPE *Undo)(
        ITextDocument *This,
        LONG Count,
        LONG *prop);

    HRESULT (STDMETHODCALLTYPE *Redo)(
        ITextDocument *This,
        LONG Count,
        LONG *prop);

    HRESULT (STDMETHODCALLTYPE *Range)(
        ITextDocument *This,
        LONG cp1,
        LONG cp2,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *RangeFromPoint)(
        ITextDocument *This,
        LONG x,
        LONG y,
        ITextRange **ppRange);

    END_INTERFACE
} ITextDocumentVtbl;

interface ITextDocument {
    CONST_VTBL ITextDocumentVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextDocument_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextDocument_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextDocument_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextDocument_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextDocument_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextDocument_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextDocument_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextDocument methods ***/
#define ITextDocument_GetName(This,pName) (This)->lpVtbl->GetName(This,pName)
#define ITextDocument_GetSelection(This,ppSel) (This)->lpVtbl->GetSelection(This,ppSel)
#define ITextDocument_GetStoryCount(This,pCount) (This)->lpVtbl->GetStoryCount(This,pCount)
#define ITextDocument_GetStoryRanges(This,ppStories) (This)->lpVtbl->GetStoryRanges(This,ppStories)
#define ITextDocument_GetSaved(This,pValue) (This)->lpVtbl->GetSaved(This,pValue)
#define ITextDocument_SetSaved(This,Value) (This)->lpVtbl->SetSaved(This,Value)
#define ITextDocument_GetDefaultTabStop(This,pValue) (This)->lpVtbl->GetDefaultTabStop(This,pValue)
#define ITextDocument_SetDefaultTabStop(This,Value) (This)->lpVtbl->SetDefaultTabStop(This,Value)
#define ITextDocument_New(This) (This)->lpVtbl->New(This)
#define ITextDocument_Open(This,pVar,Flags,CodePage) (This)->lpVtbl->Open(This,pVar,Flags,CodePage)
#define ITextDocument_Save(This,pVar,Flags,CodePage) (This)->lpVtbl->Save(This,pVar,Flags,CodePage)
#define ITextDocument_Freeze(This,pCount) (This)->lpVtbl->Freeze(This,pCount)
#define ITextDocument_Unfreeze(This,pCount) (This)->lpVtbl->Unfreeze(This,pCount)
#define ITextDocument_BeginEditCollection(This) (This)->lpVtbl->BeginEditCollection(This)
#define ITextDocument_EndEditCollection(This) (This)->lpVtbl->EndEditCollection(This)
#define ITextDocument_Undo(This,Count,prop) (This)->lpVtbl->Undo(This,Count,prop)
#define ITextDocument_Redo(This,Count,prop) (This)->lpVtbl->Redo(This,Count,prop)
#define ITextDocument_Range(This,cp1,cp2,ppRange) (This)->lpVtbl->Range(This,cp1,cp2,ppRange)
#define ITextDocument_RangeFromPoint(This,x,y,ppRange) (This)->lpVtbl->RangeFromPoint(This,x,y,ppRange)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextDocument_QueryInterface(ITextDocument* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextDocument_AddRef(ITextDocument* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextDocument_Release(ITextDocument* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextDocument_GetTypeInfoCount(ITextDocument* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextDocument_GetTypeInfo(ITextDocument* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextDocument_GetIDsOfNames(ITextDocument* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextDocument_Invoke(ITextDocument* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextDocument methods ***/
static inline HRESULT ITextDocument_GetName(ITextDocument* This,BSTR *pName) {
    return This->lpVtbl->GetName(This,pName);
}
static inline HRESULT ITextDocument_GetSelection(ITextDocument* This,ITextSelection **ppSel) {
    return This->lpVtbl->GetSelection(This,ppSel);
}
static inline HRESULT ITextDocument_GetStoryCount(ITextDocument* This,LONG *pCount) {
    return This->lpVtbl->GetStoryCount(This,pCount);
}
static inline HRESULT ITextDocument_GetStoryRanges(ITextDocument* This,ITextStoryRanges **ppStories) {
    return This->lpVtbl->GetStoryRanges(This,ppStories);
}
static inline HRESULT ITextDocument_GetSaved(ITextDocument* This,LONG *pValue) {
    return This->lpVtbl->GetSaved(This,pValue);
}
static inline HRESULT ITextDocument_SetSaved(ITextDocument* This,LONG Value) {
    return This->lpVtbl->SetSaved(This,Value);
}
static inline HRESULT ITextDocument_GetDefaultTabStop(ITextDocument* This,float *pValue) {
    return This->lpVtbl->GetDefaultTabStop(This,pValue);
}
static inline HRESULT ITextDocument_SetDefaultTabStop(ITextDocument* This,float Value) {
    return This->lpVtbl->SetDefaultTabStop(This,Value);
}
static inline HRESULT ITextDocument_New(ITextDocument* This) {
    return This->lpVtbl->New(This);
}
static inline HRESULT ITextDocument_Open(ITextDocument* This,VARIANT *pVar,LONG Flags,LONG CodePage) {
    return This->lpVtbl->Open(This,pVar,Flags,CodePage);
}
static inline HRESULT ITextDocument_Save(ITextDocument* This,VARIANT *pVar,LONG Flags,LONG CodePage) {
    return This->lpVtbl->Save(This,pVar,Flags,CodePage);
}
static inline HRESULT ITextDocument_Freeze(ITextDocument* This,LONG *pCount) {
    return This->lpVtbl->Freeze(This,pCount);
}
static inline HRESULT ITextDocument_Unfreeze(ITextDocument* This,LONG *pCount) {
    return This->lpVtbl->Unfreeze(This,pCount);
}
static inline HRESULT ITextDocument_BeginEditCollection(ITextDocument* This) {
    return This->lpVtbl->BeginEditCollection(This);
}
static inline HRESULT ITextDocument_EndEditCollection(ITextDocument* This) {
    return This->lpVtbl->EndEditCollection(This);
}
static inline HRESULT ITextDocument_Undo(ITextDocument* This,LONG Count,LONG *prop) {
    return This->lpVtbl->Undo(This,Count,prop);
}
static inline HRESULT ITextDocument_Redo(ITextDocument* This,LONG Count,LONG *prop) {
    return This->lpVtbl->Redo(This,Count,prop);
}
static inline HRESULT ITextDocument_Range(ITextDocument* This,LONG cp1,LONG cp2,ITextRange **ppRange) {
    return This->lpVtbl->Range(This,cp1,cp2,ppRange);
}
static inline HRESULT ITextDocument_RangeFromPoint(ITextDocument* This,LONG x,LONG y,ITextRange **ppRange) {
    return This->lpVtbl->RangeFromPoint(This,x,y,ppRange);
}
#endif
#endif

#endif


#endif  /* __ITextDocument_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITextDocument2Old interface
 */
#ifndef __ITextDocument2Old_INTERFACE_DEFINED__
#define __ITextDocument2Old_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextDocument2Old, 0x01c25500, 0x4268, 0x11d1, 0x88,0x3a, 0x3c,0x8b,0x00,0xc1,0x00,0x00);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("01c25500-4268-11d1-883a-3c8b00c10000")
ITextDocument2Old : public ITextDocument
{
    virtual HRESULT STDMETHODCALLTYPE AttachMsgFilter(
        IUnknown *filter) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetEffectColor(
        LONG index,
        COLORREF cr) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEffectColor(
        LONG index,
        COLORREF *cr) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCaretType(
        LONG *type) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCaretType(
        LONG type) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetImmContext(
        LONG *context) = 0;

    virtual HRESULT STDMETHODCALLTYPE ReleaseImmContext(
        LONG context) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPreferredFont(
        LONG cp,
        LONG codepage,
        LONG option,
        LONG current_codepage,
        LONG current_fontsize,
        BSTR *bstr,
        LONG *pitch_family,
        LONG *new_fontsize) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetNotificationMode(
        LONG *mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetNotificationMode(
        LONG mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetClientRect(
        LONG type,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSelectionEx(
        ITextSelection **selection) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetWindow(
        LONG *hwnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFEFlags(
        LONG *flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE UpdateWindow(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckTextLimit(
        LONG cch,
        LONG *exceed) = 0;

    virtual HRESULT STDMETHODCALLTYPE IMEInProgress(
        LONG mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE SysBeep(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Update(
        LONG mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE Notify(
        LONG notify) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextDocument2Old, 0x01c25500, 0x4268, 0x11d1, 0x88,0x3a, 0x3c,0x8b,0x00,0xc1,0x00,0x00)
#endif
#else
typedef struct ITextDocument2OldVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextDocument2Old *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextDocument2Old *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextDocument2Old *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextDocument2Old *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextDocument2Old *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextDocument2Old *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextDocument2Old *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextDocument methods ***/
    HRESULT (STDMETHODCALLTYPE *GetName)(
        ITextDocument2Old *This,
        BSTR *pName);

    HRESULT (STDMETHODCALLTYPE *GetSelection)(
        ITextDocument2Old *This,
        ITextSelection **ppSel);

    HRESULT (STDMETHODCALLTYPE *GetStoryCount)(
        ITextDocument2Old *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *GetStoryRanges)(
        ITextDocument2Old *This,
        ITextStoryRanges **ppStories);

    HRESULT (STDMETHODCALLTYPE *GetSaved)(
        ITextDocument2Old *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSaved)(
        ITextDocument2Old *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetDefaultTabStop)(
        ITextDocument2Old *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetDefaultTabStop)(
        ITextDocument2Old *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *New)(
        ITextDocument2Old *This);

    HRESULT (STDMETHODCALLTYPE *Open)(
        ITextDocument2Old *This,
        VARIANT *pVar,
        LONG Flags,
        LONG CodePage);

    HRESULT (STDMETHODCALLTYPE *Save)(
        ITextDocument2Old *This,
        VARIANT *pVar,
        LONG Flags,
        LONG CodePage);

    HRESULT (STDMETHODCALLTYPE *Freeze)(
        ITextDocument2Old *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *Unfreeze)(
        ITextDocument2Old *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *BeginEditCollection)(
        ITextDocument2Old *This);

    HRESULT (STDMETHODCALLTYPE *EndEditCollection)(
        ITextDocument2Old *This);

    HRESULT (STDMETHODCALLTYPE *Undo)(
        ITextDocument2Old *This,
        LONG Count,
        LONG *prop);

    HRESULT (STDMETHODCALLTYPE *Redo)(
        ITextDocument2Old *This,
        LONG Count,
        LONG *prop);

    HRESULT (STDMETHODCALLTYPE *Range)(
        ITextDocument2Old *This,
        LONG cp1,
        LONG cp2,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *RangeFromPoint)(
        ITextDocument2Old *This,
        LONG x,
        LONG y,
        ITextRange **ppRange);

    /*** ITextDocument2Old methods ***/
    HRESULT (STDMETHODCALLTYPE *AttachMsgFilter)(
        ITextDocument2Old *This,
        IUnknown *filter);

    HRESULT (STDMETHODCALLTYPE *SetEffectColor)(
        ITextDocument2Old *This,
        LONG index,
        COLORREF cr);

    HRESULT (STDMETHODCALLTYPE *GetEffectColor)(
        ITextDocument2Old *This,
        LONG index,
        COLORREF *cr);

    HRESULT (STDMETHODCALLTYPE *GetCaretType)(
        ITextDocument2Old *This,
        LONG *type);

    HRESULT (STDMETHODCALLTYPE *SetCaretType)(
        ITextDocument2Old *This,
        LONG type);

    HRESULT (STDMETHODCALLTYPE *GetImmContext)(
        ITextDocument2Old *This,
        LONG *context);

    HRESULT (STDMETHODCALLTYPE *ReleaseImmContext)(
        ITextDocument2Old *This,
        LONG context);

    HRESULT (STDMETHODCALLTYPE *GetPreferredFont)(
        ITextDocument2Old *This,
        LONG cp,
        LONG codepage,
        LONG option,
        LONG current_codepage,
        LONG current_fontsize,
        BSTR *bstr,
        LONG *pitch_family,
        LONG *new_fontsize);

    HRESULT (STDMETHODCALLTYPE *GetNotificationMode)(
        ITextDocument2Old *This,
        LONG *mode);

    HRESULT (STDMETHODCALLTYPE *SetNotificationMode)(
        ITextDocument2Old *This,
        LONG mode);

    HRESULT (STDMETHODCALLTYPE *GetClientRect)(
        ITextDocument2Old *This,
        LONG type,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom);

    HRESULT (STDMETHODCALLTYPE *GetSelectionEx)(
        ITextDocument2Old *This,
        ITextSelection **selection);

    HRESULT (STDMETHODCALLTYPE *GetWindow)(
        ITextDocument2Old *This,
        LONG *hwnd);

    HRESULT (STDMETHODCALLTYPE *GetFEFlags)(
        ITextDocument2Old *This,
        LONG *flags);

    HRESULT (STDMETHODCALLTYPE *UpdateWindow)(
        ITextDocument2Old *This);

    HRESULT (STDMETHODCALLTYPE *CheckTextLimit)(
        ITextDocument2Old *This,
        LONG cch,
        LONG *exceed);

    HRESULT (STDMETHODCALLTYPE *IMEInProgress)(
        ITextDocument2Old *This,
        LONG mode);

    HRESULT (STDMETHODCALLTYPE *SysBeep)(
        ITextDocument2Old *This);

    HRESULT (STDMETHODCALLTYPE *Update)(
        ITextDocument2Old *This,
        LONG mode);

    HRESULT (STDMETHODCALLTYPE *Notify)(
        ITextDocument2Old *This,
        LONG notify);

    END_INTERFACE
} ITextDocument2OldVtbl;

interface ITextDocument2Old {
    CONST_VTBL ITextDocument2OldVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextDocument2Old_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextDocument2Old_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextDocument2Old_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextDocument2Old_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextDocument2Old_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextDocument2Old_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextDocument2Old_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextDocument methods ***/
#define ITextDocument2Old_GetName(This,pName) (This)->lpVtbl->GetName(This,pName)
#define ITextDocument2Old_GetSelection(This,ppSel) (This)->lpVtbl->GetSelection(This,ppSel)
#define ITextDocument2Old_GetStoryCount(This,pCount) (This)->lpVtbl->GetStoryCount(This,pCount)
#define ITextDocument2Old_GetStoryRanges(This,ppStories) (This)->lpVtbl->GetStoryRanges(This,ppStories)
#define ITextDocument2Old_GetSaved(This,pValue) (This)->lpVtbl->GetSaved(This,pValue)
#define ITextDocument2Old_SetSaved(This,Value) (This)->lpVtbl->SetSaved(This,Value)
#define ITextDocument2Old_GetDefaultTabStop(This,pValue) (This)->lpVtbl->GetDefaultTabStop(This,pValue)
#define ITextDocument2Old_SetDefaultTabStop(This,Value) (This)->lpVtbl->SetDefaultTabStop(This,Value)
#define ITextDocument2Old_New(This) (This)->lpVtbl->New(This)
#define ITextDocument2Old_Open(This,pVar,Flags,CodePage) (This)->lpVtbl->Open(This,pVar,Flags,CodePage)
#define ITextDocument2Old_Save(This,pVar,Flags,CodePage) (This)->lpVtbl->Save(This,pVar,Flags,CodePage)
#define ITextDocument2Old_Freeze(This,pCount) (This)->lpVtbl->Freeze(This,pCount)
#define ITextDocument2Old_Unfreeze(This,pCount) (This)->lpVtbl->Unfreeze(This,pCount)
#define ITextDocument2Old_BeginEditCollection(This) (This)->lpVtbl->BeginEditCollection(This)
#define ITextDocument2Old_EndEditCollection(This) (This)->lpVtbl->EndEditCollection(This)
#define ITextDocument2Old_Undo(This,Count,prop) (This)->lpVtbl->Undo(This,Count,prop)
#define ITextDocument2Old_Redo(This,Count,prop) (This)->lpVtbl->Redo(This,Count,prop)
#define ITextDocument2Old_Range(This,cp1,cp2,ppRange) (This)->lpVtbl->Range(This,cp1,cp2,ppRange)
#define ITextDocument2Old_RangeFromPoint(This,x,y,ppRange) (This)->lpVtbl->RangeFromPoint(This,x,y,ppRange)
/*** ITextDocument2Old methods ***/
#define ITextDocument2Old_AttachMsgFilter(This,filter) (This)->lpVtbl->AttachMsgFilter(This,filter)
#define ITextDocument2Old_SetEffectColor(This,index,cr) (This)->lpVtbl->SetEffectColor(This,index,cr)
#define ITextDocument2Old_GetEffectColor(This,index,cr) (This)->lpVtbl->GetEffectColor(This,index,cr)
#define ITextDocument2Old_GetCaretType(This,type) (This)->lpVtbl->GetCaretType(This,type)
#define ITextDocument2Old_SetCaretType(This,type) (This)->lpVtbl->SetCaretType(This,type)
#define ITextDocument2Old_GetImmContext(This,context) (This)->lpVtbl->GetImmContext(This,context)
#define ITextDocument2Old_ReleaseImmContext(This,context) (This)->lpVtbl->ReleaseImmContext(This,context)
#define ITextDocument2Old_GetPreferredFont(This,cp,codepage,option,current_codepage,current_fontsize,bstr,pitch_family,new_fontsize) (This)->lpVtbl->GetPreferredFont(This,cp,codepage,option,current_codepage,current_fontsize,bstr,pitch_family,new_fontsize)
#define ITextDocument2Old_GetNotificationMode(This,mode) (This)->lpVtbl->GetNotificationMode(This,mode)
#define ITextDocument2Old_SetNotificationMode(This,mode) (This)->lpVtbl->SetNotificationMode(This,mode)
#define ITextDocument2Old_GetClientRect(This,type,left,top,right,bottom) (This)->lpVtbl->GetClientRect(This,type,left,top,right,bottom)
#define ITextDocument2Old_GetSelectionEx(This,selection) (This)->lpVtbl->GetSelectionEx(This,selection)
#define ITextDocument2Old_GetWindow(This,hwnd) (This)->lpVtbl->GetWindow(This,hwnd)
#define ITextDocument2Old_GetFEFlags(This,flags) (This)->lpVtbl->GetFEFlags(This,flags)
#define ITextDocument2Old_UpdateWindow(This) (This)->lpVtbl->UpdateWindow(This)
#define ITextDocument2Old_CheckTextLimit(This,cch,exceed) (This)->lpVtbl->CheckTextLimit(This,cch,exceed)
#define ITextDocument2Old_IMEInProgress(This,mode) (This)->lpVtbl->IMEInProgress(This,mode)
#define ITextDocument2Old_SysBeep(This) (This)->lpVtbl->SysBeep(This)
#define ITextDocument2Old_Update(This,mode) (This)->lpVtbl->Update(This,mode)
#define ITextDocument2Old_Notify(This,notify) (This)->lpVtbl->Notify(This,notify)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextDocument2Old_QueryInterface(ITextDocument2Old* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextDocument2Old_AddRef(ITextDocument2Old* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextDocument2Old_Release(ITextDocument2Old* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextDocument2Old_GetTypeInfoCount(ITextDocument2Old* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextDocument2Old_GetTypeInfo(ITextDocument2Old* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextDocument2Old_GetIDsOfNames(ITextDocument2Old* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextDocument2Old_Invoke(ITextDocument2Old* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextDocument methods ***/
static inline HRESULT ITextDocument2Old_GetName(ITextDocument2Old* This,BSTR *pName) {
    return This->lpVtbl->GetName(This,pName);
}
static inline HRESULT ITextDocument2Old_GetSelection(ITextDocument2Old* This,ITextSelection **ppSel) {
    return This->lpVtbl->GetSelection(This,ppSel);
}
static inline HRESULT ITextDocument2Old_GetStoryCount(ITextDocument2Old* This,LONG *pCount) {
    return This->lpVtbl->GetStoryCount(This,pCount);
}
static inline HRESULT ITextDocument2Old_GetStoryRanges(ITextDocument2Old* This,ITextStoryRanges **ppStories) {
    return This->lpVtbl->GetStoryRanges(This,ppStories);
}
static inline HRESULT ITextDocument2Old_GetSaved(ITextDocument2Old* This,LONG *pValue) {
    return This->lpVtbl->GetSaved(This,pValue);
}
static inline HRESULT ITextDocument2Old_SetSaved(ITextDocument2Old* This,LONG Value) {
    return This->lpVtbl->SetSaved(This,Value);
}
static inline HRESULT ITextDocument2Old_GetDefaultTabStop(ITextDocument2Old* This,float *pValue) {
    return This->lpVtbl->GetDefaultTabStop(This,pValue);
}
static inline HRESULT ITextDocument2Old_SetDefaultTabStop(ITextDocument2Old* This,float Value) {
    return This->lpVtbl->SetDefaultTabStop(This,Value);
}
static inline HRESULT ITextDocument2Old_New(ITextDocument2Old* This) {
    return This->lpVtbl->New(This);
}
static inline HRESULT ITextDocument2Old_Open(ITextDocument2Old* This,VARIANT *pVar,LONG Flags,LONG CodePage) {
    return This->lpVtbl->Open(This,pVar,Flags,CodePage);
}
static inline HRESULT ITextDocument2Old_Save(ITextDocument2Old* This,VARIANT *pVar,LONG Flags,LONG CodePage) {
    return This->lpVtbl->Save(This,pVar,Flags,CodePage);
}
static inline HRESULT ITextDocument2Old_Freeze(ITextDocument2Old* This,LONG *pCount) {
    return This->lpVtbl->Freeze(This,pCount);
}
static inline HRESULT ITextDocument2Old_Unfreeze(ITextDocument2Old* This,LONG *pCount) {
    return This->lpVtbl->Unfreeze(This,pCount);
}
static inline HRESULT ITextDocument2Old_BeginEditCollection(ITextDocument2Old* This) {
    return This->lpVtbl->BeginEditCollection(This);
}
static inline HRESULT ITextDocument2Old_EndEditCollection(ITextDocument2Old* This) {
    return This->lpVtbl->EndEditCollection(This);
}
static inline HRESULT ITextDocument2Old_Undo(ITextDocument2Old* This,LONG Count,LONG *prop) {
    return This->lpVtbl->Undo(This,Count,prop);
}
static inline HRESULT ITextDocument2Old_Redo(ITextDocument2Old* This,LONG Count,LONG *prop) {
    return This->lpVtbl->Redo(This,Count,prop);
}
static inline HRESULT ITextDocument2Old_Range(ITextDocument2Old* This,LONG cp1,LONG cp2,ITextRange **ppRange) {
    return This->lpVtbl->Range(This,cp1,cp2,ppRange);
}
static inline HRESULT ITextDocument2Old_RangeFromPoint(ITextDocument2Old* This,LONG x,LONG y,ITextRange **ppRange) {
    return This->lpVtbl->RangeFromPoint(This,x,y,ppRange);
}
/*** ITextDocument2Old methods ***/
static inline HRESULT ITextDocument2Old_AttachMsgFilter(ITextDocument2Old* This,IUnknown *filter) {
    return This->lpVtbl->AttachMsgFilter(This,filter);
}
static inline HRESULT ITextDocument2Old_SetEffectColor(ITextDocument2Old* This,LONG index,COLORREF cr) {
    return This->lpVtbl->SetEffectColor(This,index,cr);
}
static inline HRESULT ITextDocument2Old_GetEffectColor(ITextDocument2Old* This,LONG index,COLORREF *cr) {
    return This->lpVtbl->GetEffectColor(This,index,cr);
}
static inline HRESULT ITextDocument2Old_GetCaretType(ITextDocument2Old* This,LONG *type) {
    return This->lpVtbl->GetCaretType(This,type);
}
static inline HRESULT ITextDocument2Old_SetCaretType(ITextDocument2Old* This,LONG type) {
    return This->lpVtbl->SetCaretType(This,type);
}
static inline HRESULT ITextDocument2Old_GetImmContext(ITextDocument2Old* This,LONG *context) {
    return This->lpVtbl->GetImmContext(This,context);
}
static inline HRESULT ITextDocument2Old_ReleaseImmContext(ITextDocument2Old* This,LONG context) {
    return This->lpVtbl->ReleaseImmContext(This,context);
}
static inline HRESULT ITextDocument2Old_GetPreferredFont(ITextDocument2Old* This,LONG cp,LONG codepage,LONG option,LONG current_codepage,LONG current_fontsize,BSTR *bstr,LONG *pitch_family,LONG *new_fontsize) {
    return This->lpVtbl->GetPreferredFont(This,cp,codepage,option,current_codepage,current_fontsize,bstr,pitch_family,new_fontsize);
}
static inline HRESULT ITextDocument2Old_GetNotificationMode(ITextDocument2Old* This,LONG *mode) {
    return This->lpVtbl->GetNotificationMode(This,mode);
}
static inline HRESULT ITextDocument2Old_SetNotificationMode(ITextDocument2Old* This,LONG mode) {
    return This->lpVtbl->SetNotificationMode(This,mode);
}
static inline HRESULT ITextDocument2Old_GetClientRect(ITextDocument2Old* This,LONG type,LONG *left,LONG *top,LONG *right,LONG *bottom) {
    return This->lpVtbl->GetClientRect(This,type,left,top,right,bottom);
}
static inline HRESULT ITextDocument2Old_GetSelectionEx(ITextDocument2Old* This,ITextSelection **selection) {
    return This->lpVtbl->GetSelectionEx(This,selection);
}
static inline HRESULT ITextDocument2Old_GetWindow(ITextDocument2Old* This,LONG *hwnd) {
    return This->lpVtbl->GetWindow(This,hwnd);
}
static inline HRESULT ITextDocument2Old_GetFEFlags(ITextDocument2Old* This,LONG *flags) {
    return This->lpVtbl->GetFEFlags(This,flags);
}
static inline HRESULT ITextDocument2Old_UpdateWindow(ITextDocument2Old* This) {
    return This->lpVtbl->UpdateWindow(This);
}
static inline HRESULT ITextDocument2Old_CheckTextLimit(ITextDocument2Old* This,LONG cch,LONG *exceed) {
    return This->lpVtbl->CheckTextLimit(This,cch,exceed);
}
static inline HRESULT ITextDocument2Old_IMEInProgress(ITextDocument2Old* This,LONG mode) {
    return This->lpVtbl->IMEInProgress(This,mode);
}
static inline HRESULT ITextDocument2Old_SysBeep(ITextDocument2Old* This) {
    return This->lpVtbl->SysBeep(This);
}
static inline HRESULT ITextDocument2Old_Update(ITextDocument2Old* This,LONG mode) {
    return This->lpVtbl->Update(This,mode);
}
static inline HRESULT ITextDocument2Old_Notify(ITextDocument2Old* This,LONG notify) {
    return This->lpVtbl->Notify(This,notify);
}
#endif
#endif

#endif


#endif  /* __ITextDocument2Old_INTERFACE_DEFINED__ */

#ifndef __ITextDisplays_FWD_DEFINED__
#define __ITextDisplays_FWD_DEFINED__
typedef interface ITextDisplays ITextDisplays;
#ifdef __cplusplus
interface ITextDisplays;
#endif /* __cplusplus */
#endif

#ifndef __ITextFont2_FWD_DEFINED__
#define __ITextFont2_FWD_DEFINED__
typedef interface ITextFont2 ITextFont2;
#ifdef __cplusplus
interface ITextFont2;
#endif /* __cplusplus */
#endif

#ifndef __ITextPara2_FWD_DEFINED__
#define __ITextPara2_FWD_DEFINED__
typedef interface ITextPara2 ITextPara2;
#ifdef __cplusplus
interface ITextPara2;
#endif /* __cplusplus */
#endif

#ifndef __ITextRange2_FWD_DEFINED__
#define __ITextRange2_FWD_DEFINED__
typedef interface ITextRange2 ITextRange2;
#ifdef __cplusplus
interface ITextRange2;
#endif /* __cplusplus */
#endif

#ifndef __ITextSelection2_FWD_DEFINED__
#define __ITextSelection2_FWD_DEFINED__
typedef interface ITextSelection2 ITextSelection2;
#ifdef __cplusplus
interface ITextSelection2;
#endif /* __cplusplus */
#endif

#ifndef __ITextStory_FWD_DEFINED__
#define __ITextStory_FWD_DEFINED__
typedef interface ITextStory ITextStory;
#ifdef __cplusplus
interface ITextStory;
#endif /* __cplusplus */
#endif

#ifndef __ITextStoryRanges2_FWD_DEFINED__
#define __ITextStoryRanges2_FWD_DEFINED__
typedef interface ITextStoryRanges2 ITextStoryRanges2;
#ifdef __cplusplus
interface ITextStoryRanges2;
#endif /* __cplusplus */
#endif

#ifndef __ITextStrings_FWD_DEFINED__
#define __ITextStrings_FWD_DEFINED__
typedef interface ITextStrings ITextStrings;
#ifdef __cplusplus
interface ITextStrings;
#endif /* __cplusplus */
#endif

/*****************************************************************************
 * ITextRow interface
 */
#ifndef __ITextRow_INTERFACE_DEFINED__
#define __ITextRow_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextRow, 0xc241f5ef, 0x7206, 0x11d8, 0xa2,0xc7, 0x00,0xa0,0xd1,0xd6,0xc6,0xb3);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("c241f5ef-7206-11d8-a2c7-00a0d1d6c6b3")
ITextRow : public IDispatch
{
    virtual HRESULT STDMETHODCALLTYPE GetAlignment(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAlignment(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellCount(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellCount(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellCountCache(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellCountCache(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellIndex(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellIndex(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellMargin(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellMargin(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetHeight(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetHeight(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetIndent(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetIndent(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetKeepTogether(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetKeepTogether(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetKeepWithNext(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetKeepWithNext(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetNestLevel(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRTL(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetRTL(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellAlignment(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellAlignment(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellColorBack(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellColorBack(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellColorFore(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellColorFore(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellMergeFlags(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellMergeFlags(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellShading(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellShading(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellVerticalText(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellVerticalText(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellWidth(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellWidth(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellBorderColors(
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCellBorderWidths(
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellBorderColors(
        LONG left,
        LONG top,
        LONG right,
        LONG bottom) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCellBorderWidths(
        LONG left,
        LONG top,
        LONG right,
        LONG bottom) = 0;

    virtual HRESULT STDMETHODCALLTYPE Apply(
        LONG row,
        LONG flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE CanChange(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetProperty(
        LONG type,
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE Insert(
        LONG row) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEqual(
        ITextRow *row,
        LONG *r) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetProperty(
        LONG type,
        LONG value) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextRow, 0xc241f5ef, 0x7206, 0x11d8, 0xa2,0xc7, 0x00,0xa0,0xd1,0xd6,0xc6,0xb3)
#endif
#else
typedef struct ITextRowVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextRow *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextRow *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextRow *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextRow *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextRow *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextRow *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextRow *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextRow methods ***/
    HRESULT (STDMETHODCALLTYPE *GetAlignment)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetAlignment)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellCount)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellCount)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellCountCache)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellCountCache)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellIndex)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellIndex)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellMargin)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellMargin)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetHeight)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetHeight)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetIndent)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetIndent)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetKeepTogether)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetKeepTogether)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetKeepWithNext)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetKeepWithNext)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetNestLevel)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *GetRTL)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetRTL)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellAlignment)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellAlignment)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellColorBack)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellColorBack)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellColorFore)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellColorFore)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellMergeFlags)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellMergeFlags)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellShading)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellShading)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellVerticalText)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellVerticalText)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellWidth)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCellWidth)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetCellBorderColors)(
        ITextRow *This,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom);

    HRESULT (STDMETHODCALLTYPE *GetCellBorderWidths)(
        ITextRow *This,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom);

    HRESULT (STDMETHODCALLTYPE *SetCellBorderColors)(
        ITextRow *This,
        LONG left,
        LONG top,
        LONG right,
        LONG bottom);

    HRESULT (STDMETHODCALLTYPE *SetCellBorderWidths)(
        ITextRow *This,
        LONG left,
        LONG top,
        LONG right,
        LONG bottom);

    HRESULT (STDMETHODCALLTYPE *Apply)(
        ITextRow *This,
        LONG row,
        LONG flags);

    HRESULT (STDMETHODCALLTYPE *CanChange)(
        ITextRow *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *GetProperty)(
        ITextRow *This,
        LONG type,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *Insert)(
        ITextRow *This,
        LONG row);

    HRESULT (STDMETHODCALLTYPE *IsEqual)(
        ITextRow *This,
        ITextRow *row,
        LONG *r);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        ITextRow *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *SetProperty)(
        ITextRow *This,
        LONG type,
        LONG value);

    END_INTERFACE
} ITextRowVtbl;

interface ITextRow {
    CONST_VTBL ITextRowVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextRow_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextRow_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextRow_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextRow_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextRow_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextRow_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextRow_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextRow methods ***/
#define ITextRow_GetAlignment(This,value) (This)->lpVtbl->GetAlignment(This,value)
#define ITextRow_SetAlignment(This,value) (This)->lpVtbl->SetAlignment(This,value)
#define ITextRow_GetCellCount(This,value) (This)->lpVtbl->GetCellCount(This,value)
#define ITextRow_SetCellCount(This,value) (This)->lpVtbl->SetCellCount(This,value)
#define ITextRow_GetCellCountCache(This,value) (This)->lpVtbl->GetCellCountCache(This,value)
#define ITextRow_SetCellCountCache(This,value) (This)->lpVtbl->SetCellCountCache(This,value)
#define ITextRow_GetCellIndex(This,value) (This)->lpVtbl->GetCellIndex(This,value)
#define ITextRow_SetCellIndex(This,value) (This)->lpVtbl->SetCellIndex(This,value)
#define ITextRow_GetCellMargin(This,value) (This)->lpVtbl->GetCellMargin(This,value)
#define ITextRow_SetCellMargin(This,value) (This)->lpVtbl->SetCellMargin(This,value)
#define ITextRow_GetHeight(This,value) (This)->lpVtbl->GetHeight(This,value)
#define ITextRow_SetHeight(This,value) (This)->lpVtbl->SetHeight(This,value)
#define ITextRow_GetIndent(This,value) (This)->lpVtbl->GetIndent(This,value)
#define ITextRow_SetIndent(This,value) (This)->lpVtbl->SetIndent(This,value)
#define ITextRow_GetKeepTogether(This,value) (This)->lpVtbl->GetKeepTogether(This,value)
#define ITextRow_SetKeepTogether(This,value) (This)->lpVtbl->SetKeepTogether(This,value)
#define ITextRow_GetKeepWithNext(This,value) (This)->lpVtbl->GetKeepWithNext(This,value)
#define ITextRow_SetKeepWithNext(This,value) (This)->lpVtbl->SetKeepWithNext(This,value)
#define ITextRow_GetNestLevel(This,value) (This)->lpVtbl->GetNestLevel(This,value)
#define ITextRow_GetRTL(This,value) (This)->lpVtbl->GetRTL(This,value)
#define ITextRow_SetRTL(This,value) (This)->lpVtbl->SetRTL(This,value)
#define ITextRow_GetCellAlignment(This,value) (This)->lpVtbl->GetCellAlignment(This,value)
#define ITextRow_SetCellAlignment(This,value) (This)->lpVtbl->SetCellAlignment(This,value)
#define ITextRow_GetCellColorBack(This,value) (This)->lpVtbl->GetCellColorBack(This,value)
#define ITextRow_SetCellColorBack(This,value) (This)->lpVtbl->SetCellColorBack(This,value)
#define ITextRow_GetCellColorFore(This,value) (This)->lpVtbl->GetCellColorFore(This,value)
#define ITextRow_SetCellColorFore(This,value) (This)->lpVtbl->SetCellColorFore(This,value)
#define ITextRow_GetCellMergeFlags(This,value) (This)->lpVtbl->GetCellMergeFlags(This,value)
#define ITextRow_SetCellMergeFlags(This,value) (This)->lpVtbl->SetCellMergeFlags(This,value)
#define ITextRow_GetCellShading(This,value) (This)->lpVtbl->GetCellShading(This,value)
#define ITextRow_SetCellShading(This,value) (This)->lpVtbl->SetCellShading(This,value)
#define ITextRow_GetCellVerticalText(This,value) (This)->lpVtbl->GetCellVerticalText(This,value)
#define ITextRow_SetCellVerticalText(This,value) (This)->lpVtbl->SetCellVerticalText(This,value)
#define ITextRow_GetCellWidth(This,value) (This)->lpVtbl->GetCellWidth(This,value)
#define ITextRow_SetCellWidth(This,value) (This)->lpVtbl->SetCellWidth(This,value)
#define ITextRow_GetCellBorderColors(This,left,top,right,bottom) (This)->lpVtbl->GetCellBorderColors(This,left,top,right,bottom)
#define ITextRow_GetCellBorderWidths(This,left,top,right,bottom) (This)->lpVtbl->GetCellBorderWidths(This,left,top,right,bottom)
#define ITextRow_SetCellBorderColors(This,left,top,right,bottom) (This)->lpVtbl->SetCellBorderColors(This,left,top,right,bottom)
#define ITextRow_SetCellBorderWidths(This,left,top,right,bottom) (This)->lpVtbl->SetCellBorderWidths(This,left,top,right,bottom)
#define ITextRow_Apply(This,row,flags) (This)->lpVtbl->Apply(This,row,flags)
#define ITextRow_CanChange(This,value) (This)->lpVtbl->CanChange(This,value)
#define ITextRow_GetProperty(This,type,value) (This)->lpVtbl->GetProperty(This,type,value)
#define ITextRow_Insert(This,row) (This)->lpVtbl->Insert(This,row)
#define ITextRow_IsEqual(This,row,r) (This)->lpVtbl->IsEqual(This,row,r)
#define ITextRow_Reset(This,value) (This)->lpVtbl->Reset(This,value)
#define ITextRow_SetProperty(This,type,value) (This)->lpVtbl->SetProperty(This,type,value)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextRow_QueryInterface(ITextRow* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextRow_AddRef(ITextRow* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextRow_Release(ITextRow* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextRow_GetTypeInfoCount(ITextRow* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextRow_GetTypeInfo(ITextRow* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextRow_GetIDsOfNames(ITextRow* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextRow_Invoke(ITextRow* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextRow methods ***/
static inline HRESULT ITextRow_GetAlignment(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetAlignment(This,value);
}
static inline HRESULT ITextRow_SetAlignment(ITextRow* This,LONG value) {
    return This->lpVtbl->SetAlignment(This,value);
}
static inline HRESULT ITextRow_GetCellCount(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellCount(This,value);
}
static inline HRESULT ITextRow_SetCellCount(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellCount(This,value);
}
static inline HRESULT ITextRow_GetCellCountCache(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellCountCache(This,value);
}
static inline HRESULT ITextRow_SetCellCountCache(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellCountCache(This,value);
}
static inline HRESULT ITextRow_GetCellIndex(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellIndex(This,value);
}
static inline HRESULT ITextRow_SetCellIndex(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellIndex(This,value);
}
static inline HRESULT ITextRow_GetCellMargin(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellMargin(This,value);
}
static inline HRESULT ITextRow_SetCellMargin(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellMargin(This,value);
}
static inline HRESULT ITextRow_GetHeight(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetHeight(This,value);
}
static inline HRESULT ITextRow_SetHeight(ITextRow* This,LONG value) {
    return This->lpVtbl->SetHeight(This,value);
}
static inline HRESULT ITextRow_GetIndent(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetIndent(This,value);
}
static inline HRESULT ITextRow_SetIndent(ITextRow* This,LONG value) {
    return This->lpVtbl->SetIndent(This,value);
}
static inline HRESULT ITextRow_GetKeepTogether(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetKeepTogether(This,value);
}
static inline HRESULT ITextRow_SetKeepTogether(ITextRow* This,LONG value) {
    return This->lpVtbl->SetKeepTogether(This,value);
}
static inline HRESULT ITextRow_GetKeepWithNext(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetKeepWithNext(This,value);
}
static inline HRESULT ITextRow_SetKeepWithNext(ITextRow* This,LONG value) {
    return This->lpVtbl->SetKeepWithNext(This,value);
}
static inline HRESULT ITextRow_GetNestLevel(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetNestLevel(This,value);
}
static inline HRESULT ITextRow_GetRTL(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetRTL(This,value);
}
static inline HRESULT ITextRow_SetRTL(ITextRow* This,LONG value) {
    return This->lpVtbl->SetRTL(This,value);
}
static inline HRESULT ITextRow_GetCellAlignment(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellAlignment(This,value);
}
static inline HRESULT ITextRow_SetCellAlignment(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellAlignment(This,value);
}
static inline HRESULT ITextRow_GetCellColorBack(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellColorBack(This,value);
}
static inline HRESULT ITextRow_SetCellColorBack(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellColorBack(This,value);
}
static inline HRESULT ITextRow_GetCellColorFore(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellColorFore(This,value);
}
static inline HRESULT ITextRow_SetCellColorFore(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellColorFore(This,value);
}
static inline HRESULT ITextRow_GetCellMergeFlags(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellMergeFlags(This,value);
}
static inline HRESULT ITextRow_SetCellMergeFlags(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellMergeFlags(This,value);
}
static inline HRESULT ITextRow_GetCellShading(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellShading(This,value);
}
static inline HRESULT ITextRow_SetCellShading(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellShading(This,value);
}
static inline HRESULT ITextRow_GetCellVerticalText(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellVerticalText(This,value);
}
static inline HRESULT ITextRow_SetCellVerticalText(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellVerticalText(This,value);
}
static inline HRESULT ITextRow_GetCellWidth(ITextRow* This,LONG *value) {
    return This->lpVtbl->GetCellWidth(This,value);
}
static inline HRESULT ITextRow_SetCellWidth(ITextRow* This,LONG value) {
    return This->lpVtbl->SetCellWidth(This,value);
}
static inline HRESULT ITextRow_GetCellBorderColors(ITextRow* This,LONG *left,LONG *top,LONG *right,LONG *bottom) {
    return This->lpVtbl->GetCellBorderColors(This,left,top,right,bottom);
}
static inline HRESULT ITextRow_GetCellBorderWidths(ITextRow* This,LONG *left,LONG *top,LONG *right,LONG *bottom) {
    return This->lpVtbl->GetCellBorderWidths(This,left,top,right,bottom);
}
static inline HRESULT ITextRow_SetCellBorderColors(ITextRow* This,LONG left,LONG top,LONG right,LONG bottom) {
    return This->lpVtbl->SetCellBorderColors(This,left,top,right,bottom);
}
static inline HRESULT ITextRow_SetCellBorderWidths(ITextRow* This,LONG left,LONG top,LONG right,LONG bottom) {
    return This->lpVtbl->SetCellBorderWidths(This,left,top,right,bottom);
}
static inline HRESULT ITextRow_Apply(ITextRow* This,LONG row,LONG flags) {
    return This->lpVtbl->Apply(This,row,flags);
}
static inline HRESULT ITextRow_CanChange(ITextRow* This,LONG *value) {
    return This->lpVtbl->CanChange(This,value);
}
static inline HRESULT ITextRow_GetProperty(ITextRow* This,LONG type,LONG *value) {
    return This->lpVtbl->GetProperty(This,type,value);
}
static inline HRESULT ITextRow_Insert(ITextRow* This,LONG row) {
    return This->lpVtbl->Insert(This,row);
}
static inline HRESULT ITextRow_IsEqual(ITextRow* This,ITextRow *row,LONG *r) {
    return This->lpVtbl->IsEqual(This,row,r);
}
static inline HRESULT ITextRow_Reset(ITextRow* This,LONG value) {
    return This->lpVtbl->Reset(This,value);
}
static inline HRESULT ITextRow_SetProperty(ITextRow* This,LONG type,LONG value) {
    return This->lpVtbl->SetProperty(This,type,value);
}
#endif
#endif

#endif


#endif  /* __ITextRow_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITextDocument2 interface
 */
#ifndef __ITextDocument2_INTERFACE_DEFINED__
#define __ITextDocument2_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextDocument2, 0xc241f5e0, 0x7206, 0x11d8, 0xa2,0xc7, 0x00,0xa0,0xd1,0xd6,0xc6,0xb3);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("c241f5e0-7206-11d8-a2c7-00a0d1d6c6b3")
ITextDocument2 : public ITextDocument
{
    virtual HRESULT STDMETHODCALLTYPE GetCaretType(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCaretType(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDisplays(
        ITextDisplays **displays) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDocumentFont(
        ITextFont2 **font) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDocumentFont(
        ITextFont2 *font) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDocumentPara(
        ITextPara2 **para) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDocumentPara(
        ITextPara2 *para) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEastAsianFlags(
        LONG *flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetGenerator(
        BSTR *bstr) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetIMEInProgress(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetNotificationMode(
        LONG *mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetNotificationMode(
        LONG mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSelection2(
        ITextSelection2 **selection) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStoryRanges2(
        ITextStoryRanges2 **stories) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTypographyOptions(
        LONG *options) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVersion(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetWindow(
        LONG *hwnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE AttachMsgFilter(
        IUnknown *filter) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckTextLimit(
        LONG cch,
        LONG *exceed) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCallManager(
        IUnknown **manager) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetClientRect(
        LONG type,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEffectColor(
        LONG index,
        COLORREF *cr) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetImmContext(
        LONG *context) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPreferredFont(
        LONG cp,
        LONG codepage,
        LONG option,
        LONG current_codepage,
        LONG current_fontsize,
        BSTR *bstr,
        LONG *pitch_family,
        LONG *new_fontsize) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetProperty(
        LONG type,
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStrings(
        ITextStrings **strings) = 0;

    virtual HRESULT STDMETHODCALLTYPE Notify(
        LONG notify) = 0;

    virtual HRESULT STDMETHODCALLTYPE Range2(
        LONG cp_active,
        LONG cp_anchor,
        ITextRange2 **range) = 0;

    virtual HRESULT STDMETHODCALLTYPE RangeFromPoint2(
        LONG x,
        LONG y,
        LONG type,
        ITextRange2 **range) = 0;

    virtual HRESULT STDMETHODCALLTYPE ReleaseCallManager(
        IUnknown *manager) = 0;

    virtual HRESULT STDMETHODCALLTYPE ReleaseImmContext(
        LONG context) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetEffectColor(
        LONG index,
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetProperty(
        LONG type,
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetTypographyOptions(
        LONG options,
        LONG mask) = 0;

    virtual HRESULT STDMETHODCALLTYPE SysBeep(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Update(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE UpdateWindow(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetMathProperties(
        LONG *options) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetMathProperties(
        LONG options,
        LONG mask) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetActiveStory(
        ITextStory **story) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetActiveStory(
        ITextStory *story) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetMainStory(
        ITextStory **story) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetNewStory(
        ITextStory **story) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStory(
        LONG index,
        ITextStory **story) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextDocument2, 0xc241f5e0, 0x7206, 0x11d8, 0xa2,0xc7, 0x00,0xa0,0xd1,0xd6,0xc6,0xb3)
#endif
#else
typedef struct ITextDocument2Vtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextDocument2 *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextDocument2 *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextDocument2 *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextDocument2 *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextDocument2 *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextDocument2 *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextDocument2 *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextDocument methods ***/
    HRESULT (STDMETHODCALLTYPE *GetName)(
        ITextDocument2 *This,
        BSTR *pName);

    HRESULT (STDMETHODCALLTYPE *GetSelection)(
        ITextDocument2 *This,
        ITextSelection **ppSel);

    HRESULT (STDMETHODCALLTYPE *GetStoryCount)(
        ITextDocument2 *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *GetStoryRanges)(
        ITextDocument2 *This,
        ITextStoryRanges **ppStories);

    HRESULT (STDMETHODCALLTYPE *GetSaved)(
        ITextDocument2 *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSaved)(
        ITextDocument2 *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetDefaultTabStop)(
        ITextDocument2 *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetDefaultTabStop)(
        ITextDocument2 *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *New)(
        ITextDocument2 *This);

    HRESULT (STDMETHODCALLTYPE *Open)(
        ITextDocument2 *This,
        VARIANT *pVar,
        LONG Flags,
        LONG CodePage);

    HRESULT (STDMETHODCALLTYPE *Save)(
        ITextDocument2 *This,
        VARIANT *pVar,
        LONG Flags,
        LONG CodePage);

    HRESULT (STDMETHODCALLTYPE *Freeze)(
        ITextDocument2 *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *Unfreeze)(
        ITextDocument2 *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *BeginEditCollection)(
        ITextDocument2 *This);

    HRESULT (STDMETHODCALLTYPE *EndEditCollection)(
        ITextDocument2 *This);

    HRESULT (STDMETHODCALLTYPE *Undo)(
        ITextDocument2 *This,
        LONG Count,
        LONG *prop);

    HRESULT (STDMETHODCALLTYPE *Redo)(
        ITextDocument2 *This,
        LONG Count,
        LONG *prop);

    HRESULT (STDMETHODCALLTYPE *Range)(
        ITextDocument2 *This,
        LONG cp1,
        LONG cp2,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *RangeFromPoint)(
        ITextDocument2 *This,
        LONG x,
        LONG y,
        ITextRange **ppRange);

    /*** ITextDocument2 methods ***/
    HRESULT (STDMETHODCALLTYPE *GetCaretType)(
        ITextDocument2 *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetCaretType)(
        ITextDocument2 *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetDisplays)(
        ITextDocument2 *This,
        ITextDisplays **displays);

    HRESULT (STDMETHODCALLTYPE *GetDocumentFont)(
        ITextDocument2 *This,
        ITextFont2 **font);

    HRESULT (STDMETHODCALLTYPE *SetDocumentFont)(
        ITextDocument2 *This,
        ITextFont2 *font);

    HRESULT (STDMETHODCALLTYPE *GetDocumentPara)(
        ITextDocument2 *This,
        ITextPara2 **para);

    HRESULT (STDMETHODCALLTYPE *SetDocumentPara)(
        ITextDocument2 *This,
        ITextPara2 *para);

    HRESULT (STDMETHODCALLTYPE *GetEastAsianFlags)(
        ITextDocument2 *This,
        LONG *flags);

    HRESULT (STDMETHODCALLTYPE *GetGenerator)(
        ITextDocument2 *This,
        BSTR *bstr);

    HRESULT (STDMETHODCALLTYPE *SetIMEInProgress)(
        ITextDocument2 *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetNotificationMode)(
        ITextDocument2 *This,
        LONG *mode);

    HRESULT (STDMETHODCALLTYPE *SetNotificationMode)(
        ITextDocument2 *This,
        LONG mode);

    HRESULT (STDMETHODCALLTYPE *GetSelection2)(
        ITextDocument2 *This,
        ITextSelection2 **selection);

    HRESULT (STDMETHODCALLTYPE *GetStoryRanges2)(
        ITextDocument2 *This,
        ITextStoryRanges2 **stories);

    HRESULT (STDMETHODCALLTYPE *GetTypographyOptions)(
        ITextDocument2 *This,
        LONG *options);

    HRESULT (STDMETHODCALLTYPE *GetVersion)(
        ITextDocument2 *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *GetWindow)(
        ITextDocument2 *This,
        LONG *hwnd);

    HRESULT (STDMETHODCALLTYPE *AttachMsgFilter)(
        ITextDocument2 *This,
        IUnknown *filter);

    HRESULT (STDMETHODCALLTYPE *CheckTextLimit)(
        ITextDocument2 *This,
        LONG cch,
        LONG *exceed);

    HRESULT (STDMETHODCALLTYPE *GetCallManager)(
        ITextDocument2 *This,
        IUnknown **manager);

    HRESULT (STDMETHODCALLTYPE *GetClientRect)(
        ITextDocument2 *This,
        LONG type,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom);

    HRESULT (STDMETHODCALLTYPE *GetEffectColor)(
        ITextDocument2 *This,
        LONG index,
        COLORREF *cr);

    HRESULT (STDMETHODCALLTYPE *GetImmContext)(
        ITextDocument2 *This,
        LONG *context);

    HRESULT (STDMETHODCALLTYPE *GetPreferredFont)(
        ITextDocument2 *This,
        LONG cp,
        LONG codepage,
        LONG option,
        LONG current_codepage,
        LONG current_fontsize,
        BSTR *bstr,
        LONG *pitch_family,
        LONG *new_fontsize);

    HRESULT (STDMETHODCALLTYPE *GetProperty)(
        ITextDocument2 *This,
        LONG type,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *GetStrings)(
        ITextDocument2 *This,
        ITextStrings **strings);

    HRESULT (STDMETHODCALLTYPE *Notify)(
        ITextDocument2 *This,
        LONG notify);

    HRESULT (STDMETHODCALLTYPE *Range2)(
        ITextDocument2 *This,
        LONG cp_active,
        LONG cp_anchor,
        ITextRange2 **range);

    HRESULT (STDMETHODCALLTYPE *RangeFromPoint2)(
        ITextDocument2 *This,
        LONG x,
        LONG y,
        LONG type,
        ITextRange2 **range);

    HRESULT (STDMETHODCALLTYPE *ReleaseCallManager)(
        ITextDocument2 *This,
        IUnknown *manager);

    HRESULT (STDMETHODCALLTYPE *ReleaseImmContext)(
        ITextDocument2 *This,
        LONG context);

    HRESULT (STDMETHODCALLTYPE *SetEffectColor)(
        ITextDocument2 *This,
        LONG index,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *SetProperty)(
        ITextDocument2 *This,
        LONG type,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *SetTypographyOptions)(
        ITextDocument2 *This,
        LONG options,
        LONG mask);

    HRESULT (STDMETHODCALLTYPE *SysBeep)(
        ITextDocument2 *This);

    HRESULT (STDMETHODCALLTYPE *Update)(
        ITextDocument2 *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *UpdateWindow)(
        ITextDocument2 *This);

    HRESULT (STDMETHODCALLTYPE *GetMathProperties)(
        ITextDocument2 *This,
        LONG *options);

    HRESULT (STDMETHODCALLTYPE *SetMathProperties)(
        ITextDocument2 *This,
        LONG options,
        LONG mask);

    HRESULT (STDMETHODCALLTYPE *GetActiveStory)(
        ITextDocument2 *This,
        ITextStory **story);

    HRESULT (STDMETHODCALLTYPE *SetActiveStory)(
        ITextDocument2 *This,
        ITextStory *story);

    HRESULT (STDMETHODCALLTYPE *GetMainStory)(
        ITextDocument2 *This,
        ITextStory **story);

    HRESULT (STDMETHODCALLTYPE *GetNewStory)(
        ITextDocument2 *This,
        ITextStory **story);

    HRESULT (STDMETHODCALLTYPE *GetStory)(
        ITextDocument2 *This,
        LONG index,
        ITextStory **story);

    END_INTERFACE
} ITextDocument2Vtbl;

interface ITextDocument2 {
    CONST_VTBL ITextDocument2Vtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextDocument2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextDocument2_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextDocument2_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextDocument2_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextDocument2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextDocument2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextDocument2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextDocument methods ***/
#define ITextDocument2_GetName(This,pName) (This)->lpVtbl->GetName(This,pName)
#define ITextDocument2_GetSelection(This,ppSel) (This)->lpVtbl->GetSelection(This,ppSel)
#define ITextDocument2_GetStoryCount(This,pCount) (This)->lpVtbl->GetStoryCount(This,pCount)
#define ITextDocument2_GetStoryRanges(This,ppStories) (This)->lpVtbl->GetStoryRanges(This,ppStories)
#define ITextDocument2_GetSaved(This,pValue) (This)->lpVtbl->GetSaved(This,pValue)
#define ITextDocument2_SetSaved(This,Value) (This)->lpVtbl->SetSaved(This,Value)
#define ITextDocument2_GetDefaultTabStop(This,pValue) (This)->lpVtbl->GetDefaultTabStop(This,pValue)
#define ITextDocument2_SetDefaultTabStop(This,Value) (This)->lpVtbl->SetDefaultTabStop(This,Value)
#define ITextDocument2_New(This) (This)->lpVtbl->New(This)
#define ITextDocument2_Open(This,pVar,Flags,CodePage) (This)->lpVtbl->Open(This,pVar,Flags,CodePage)
#define ITextDocument2_Save(This,pVar,Flags,CodePage) (This)->lpVtbl->Save(This,pVar,Flags,CodePage)
#define ITextDocument2_Freeze(This,pCount) (This)->lpVtbl->Freeze(This,pCount)
#define ITextDocument2_Unfreeze(This,pCount) (This)->lpVtbl->Unfreeze(This,pCount)
#define ITextDocument2_BeginEditCollection(This) (This)->lpVtbl->BeginEditCollection(This)
#define ITextDocument2_EndEditCollection(This) (This)->lpVtbl->EndEditCollection(This)
#define ITextDocument2_Undo(This,Count,prop) (This)->lpVtbl->Undo(This,Count,prop)
#define ITextDocument2_Redo(This,Count,prop) (This)->lpVtbl->Redo(This,Count,prop)
#define ITextDocument2_Range(This,cp1,cp2,ppRange) (This)->lpVtbl->Range(This,cp1,cp2,ppRange)
#define ITextDocument2_RangeFromPoint(This,x,y,ppRange) (This)->lpVtbl->RangeFromPoint(This,x,y,ppRange)
/*** ITextDocument2 methods ***/
#define ITextDocument2_GetCaretType(This,value) (This)->lpVtbl->GetCaretType(This,value)
#define ITextDocument2_SetCaretType(This,value) (This)->lpVtbl->SetCaretType(This,value)
#define ITextDocument2_GetDisplays(This,displays) (This)->lpVtbl->GetDisplays(This,displays)
#define ITextDocument2_GetDocumentFont(This,font) (This)->lpVtbl->GetDocumentFont(This,font)
#define ITextDocument2_SetDocumentFont(This,font) (This)->lpVtbl->SetDocumentFont(This,font)
#define ITextDocument2_GetDocumentPara(This,para) (This)->lpVtbl->GetDocumentPara(This,para)
#define ITextDocument2_SetDocumentPara(This,para) (This)->lpVtbl->SetDocumentPara(This,para)
#define ITextDocument2_GetEastAsianFlags(This,flags) (This)->lpVtbl->GetEastAsianFlags(This,flags)
#define ITextDocument2_GetGenerator(This,bstr) (This)->lpVtbl->GetGenerator(This,bstr)
#define ITextDocument2_SetIMEInProgress(This,value) (This)->lpVtbl->SetIMEInProgress(This,value)
#define ITextDocument2_GetNotificationMode(This,mode) (This)->lpVtbl->GetNotificationMode(This,mode)
#define ITextDocument2_SetNotificationMode(This,mode) (This)->lpVtbl->SetNotificationMode(This,mode)
#define ITextDocument2_GetSelection2(This,selection) (This)->lpVtbl->GetSelection2(This,selection)
#define ITextDocument2_GetStoryRanges2(This,stories) (This)->lpVtbl->GetStoryRanges2(This,stories)
#define ITextDocument2_GetTypographyOptions(This,options) (This)->lpVtbl->GetTypographyOptions(This,options)
#define ITextDocument2_GetVersion(This,value) (This)->lpVtbl->GetVersion(This,value)
#define ITextDocument2_GetWindow(This,hwnd) (This)->lpVtbl->GetWindow(This,hwnd)
#define ITextDocument2_AttachMsgFilter(This,filter) (This)->lpVtbl->AttachMsgFilter(This,filter)
#define ITextDocument2_CheckTextLimit(This,cch,exceed) (This)->lpVtbl->CheckTextLimit(This,cch,exceed)
#define ITextDocument2_GetCallManager(This,manager) (This)->lpVtbl->GetCallManager(This,manager)
#define ITextDocument2_GetClientRect(This,type,left,top,right,bottom) (This)->lpVtbl->GetClientRect(This,type,left,top,right,bottom)
#define ITextDocument2_GetEffectColor(This,index,cr) (This)->lpVtbl->GetEffectColor(This,index,cr)
#define ITextDocument2_GetImmContext(This,context) (This)->lpVtbl->GetImmContext(This,context)
#define ITextDocument2_GetPreferredFont(This,cp,codepage,option,current_codepage,current_fontsize,bstr,pitch_family,new_fontsize) (This)->lpVtbl->GetPreferredFont(This,cp,codepage,option,current_codepage,current_fontsize,bstr,pitch_family,new_fontsize)
#define ITextDocument2_GetProperty(This,type,value) (This)->lpVtbl->GetProperty(This,type,value)
#define ITextDocument2_GetStrings(This,strings) (This)->lpVtbl->GetStrings(This,strings)
#define ITextDocument2_Notify(This,notify) (This)->lpVtbl->Notify(This,notify)
#define ITextDocument2_Range2(This,cp_active,cp_anchor,range) (This)->lpVtbl->Range2(This,cp_active,cp_anchor,range)
#define ITextDocument2_RangeFromPoint2(This,x,y,type,range) (This)->lpVtbl->RangeFromPoint2(This,x,y,type,range)
#define ITextDocument2_ReleaseCallManager(This,manager) (This)->lpVtbl->ReleaseCallManager(This,manager)
#define ITextDocument2_ReleaseImmContext(This,context) (This)->lpVtbl->ReleaseImmContext(This,context)
#define ITextDocument2_SetEffectColor(This,index,value) (This)->lpVtbl->SetEffectColor(This,index,value)
#define ITextDocument2_SetProperty(This,type,value) (This)->lpVtbl->SetProperty(This,type,value)
#define ITextDocument2_SetTypographyOptions(This,options,mask) (This)->lpVtbl->SetTypographyOptions(This,options,mask)
#define ITextDocument2_SysBeep(This) (This)->lpVtbl->SysBeep(This)
#define ITextDocument2_Update(This,value) (This)->lpVtbl->Update(This,value)
#define ITextDocument2_UpdateWindow(This) (This)->lpVtbl->UpdateWindow(This)
#define ITextDocument2_GetMathProperties(This,options) (This)->lpVtbl->GetMathProperties(This,options)
#define ITextDocument2_SetMathProperties(This,options,mask) (This)->lpVtbl->SetMathProperties(This,options,mask)
#define ITextDocument2_GetActiveStory(This,story) (This)->lpVtbl->GetActiveStory(This,story)
#define ITextDocument2_SetActiveStory(This,story) (This)->lpVtbl->SetActiveStory(This,story)
#define ITextDocument2_GetMainStory(This,story) (This)->lpVtbl->GetMainStory(This,story)
#define ITextDocument2_GetNewStory(This,story) (This)->lpVtbl->GetNewStory(This,story)
#define ITextDocument2_GetStory(This,index,story) (This)->lpVtbl->GetStory(This,index,story)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextDocument2_QueryInterface(ITextDocument2* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextDocument2_AddRef(ITextDocument2* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextDocument2_Release(ITextDocument2* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextDocument2_GetTypeInfoCount(ITextDocument2* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextDocument2_GetTypeInfo(ITextDocument2* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextDocument2_GetIDsOfNames(ITextDocument2* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextDocument2_Invoke(ITextDocument2* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextDocument methods ***/
static inline HRESULT ITextDocument2_GetName(ITextDocument2* This,BSTR *pName) {
    return This->lpVtbl->GetName(This,pName);
}
static inline HRESULT ITextDocument2_GetSelection(ITextDocument2* This,ITextSelection **ppSel) {
    return This->lpVtbl->GetSelection(This,ppSel);
}
static inline HRESULT ITextDocument2_GetStoryCount(ITextDocument2* This,LONG *pCount) {
    return This->lpVtbl->GetStoryCount(This,pCount);
}
static inline HRESULT ITextDocument2_GetStoryRanges(ITextDocument2* This,ITextStoryRanges **ppStories) {
    return This->lpVtbl->GetStoryRanges(This,ppStories);
}
static inline HRESULT ITextDocument2_GetSaved(ITextDocument2* This,LONG *pValue) {
    return This->lpVtbl->GetSaved(This,pValue);
}
static inline HRESULT ITextDocument2_SetSaved(ITextDocument2* This,LONG Value) {
    return This->lpVtbl->SetSaved(This,Value);
}
static inline HRESULT ITextDocument2_GetDefaultTabStop(ITextDocument2* This,float *pValue) {
    return This->lpVtbl->GetDefaultTabStop(This,pValue);
}
static inline HRESULT ITextDocument2_SetDefaultTabStop(ITextDocument2* This,float Value) {
    return This->lpVtbl->SetDefaultTabStop(This,Value);
}
static inline HRESULT ITextDocument2_New(ITextDocument2* This) {
    return This->lpVtbl->New(This);
}
static inline HRESULT ITextDocument2_Open(ITextDocument2* This,VARIANT *pVar,LONG Flags,LONG CodePage) {
    return This->lpVtbl->Open(This,pVar,Flags,CodePage);
}
static inline HRESULT ITextDocument2_Save(ITextDocument2* This,VARIANT *pVar,LONG Flags,LONG CodePage) {
    return This->lpVtbl->Save(This,pVar,Flags,CodePage);
}
static inline HRESULT ITextDocument2_Freeze(ITextDocument2* This,LONG *pCount) {
    return This->lpVtbl->Freeze(This,pCount);
}
static inline HRESULT ITextDocument2_Unfreeze(ITextDocument2* This,LONG *pCount) {
    return This->lpVtbl->Unfreeze(This,pCount);
}
static inline HRESULT ITextDocument2_BeginEditCollection(ITextDocument2* This) {
    return This->lpVtbl->BeginEditCollection(This);
}
static inline HRESULT ITextDocument2_EndEditCollection(ITextDocument2* This) {
    return This->lpVtbl->EndEditCollection(This);
}
static inline HRESULT ITextDocument2_Undo(ITextDocument2* This,LONG Count,LONG *prop) {
    return This->lpVtbl->Undo(This,Count,prop);
}
static inline HRESULT ITextDocument2_Redo(ITextDocument2* This,LONG Count,LONG *prop) {
    return This->lpVtbl->Redo(This,Count,prop);
}
static inline HRESULT ITextDocument2_Range(ITextDocument2* This,LONG cp1,LONG cp2,ITextRange **ppRange) {
    return This->lpVtbl->Range(This,cp1,cp2,ppRange);
}
static inline HRESULT ITextDocument2_RangeFromPoint(ITextDocument2* This,LONG x,LONG y,ITextRange **ppRange) {
    return This->lpVtbl->RangeFromPoint(This,x,y,ppRange);
}
/*** ITextDocument2 methods ***/
static inline HRESULT ITextDocument2_GetCaretType(ITextDocument2* This,LONG *value) {
    return This->lpVtbl->GetCaretType(This,value);
}
static inline HRESULT ITextDocument2_SetCaretType(ITextDocument2* This,LONG value) {
    return This->lpVtbl->SetCaretType(This,value);
}
static inline HRESULT ITextDocument2_GetDisplays(ITextDocument2* This,ITextDisplays **displays) {
    return This->lpVtbl->GetDisplays(This,displays);
}
static inline HRESULT ITextDocument2_GetDocumentFont(ITextDocument2* This,ITextFont2 **font) {
    return This->lpVtbl->GetDocumentFont(This,font);
}
static inline HRESULT ITextDocument2_SetDocumentFont(ITextDocument2* This,ITextFont2 *font) {
    return This->lpVtbl->SetDocumentFont(This,font);
}
static inline HRESULT ITextDocument2_GetDocumentPara(ITextDocument2* This,ITextPara2 **para) {
    return This->lpVtbl->GetDocumentPara(This,para);
}
static inline HRESULT ITextDocument2_SetDocumentPara(ITextDocument2* This,ITextPara2 *para) {
    return This->lpVtbl->SetDocumentPara(This,para);
}
static inline HRESULT ITextDocument2_GetEastAsianFlags(ITextDocument2* This,LONG *flags) {
    return This->lpVtbl->GetEastAsianFlags(This,flags);
}
static inline HRESULT ITextDocument2_GetGenerator(ITextDocument2* This,BSTR *bstr) {
    return This->lpVtbl->GetGenerator(This,bstr);
}
static inline HRESULT ITextDocument2_SetIMEInProgress(ITextDocument2* This,LONG value) {
    return This->lpVtbl->SetIMEInProgress(This,value);
}
static inline HRESULT ITextDocument2_GetNotificationMode(ITextDocument2* This,LONG *mode) {
    return This->lpVtbl->GetNotificationMode(This,mode);
}
static inline HRESULT ITextDocument2_SetNotificationMode(ITextDocument2* This,LONG mode) {
    return This->lpVtbl->SetNotificationMode(This,mode);
}
static inline HRESULT ITextDocument2_GetSelection2(ITextDocument2* This,ITextSelection2 **selection) {
    return This->lpVtbl->GetSelection2(This,selection);
}
static inline HRESULT ITextDocument2_GetStoryRanges2(ITextDocument2* This,ITextStoryRanges2 **stories) {
    return This->lpVtbl->GetStoryRanges2(This,stories);
}
static inline HRESULT ITextDocument2_GetTypographyOptions(ITextDocument2* This,LONG *options) {
    return This->lpVtbl->GetTypographyOptions(This,options);
}
static inline HRESULT ITextDocument2_GetVersion(ITextDocument2* This,LONG *value) {
    return This->lpVtbl->GetVersion(This,value);
}
static inline HRESULT ITextDocument2_GetWindow(ITextDocument2* This,LONG *hwnd) {
    return This->lpVtbl->GetWindow(This,hwnd);
}
static inline HRESULT ITextDocument2_AttachMsgFilter(ITextDocument2* This,IUnknown *filter) {
    return This->lpVtbl->AttachMsgFilter(This,filter);
}
static inline HRESULT ITextDocument2_CheckTextLimit(ITextDocument2* This,LONG cch,LONG *exceed) {
    return This->lpVtbl->CheckTextLimit(This,cch,exceed);
}
static inline HRESULT ITextDocument2_GetCallManager(ITextDocument2* This,IUnknown **manager) {
    return This->lpVtbl->GetCallManager(This,manager);
}
static inline HRESULT ITextDocument2_GetClientRect(ITextDocument2* This,LONG type,LONG *left,LONG *top,LONG *right,LONG *bottom) {
    return This->lpVtbl->GetClientRect(This,type,left,top,right,bottom);
}
static inline HRESULT ITextDocument2_GetEffectColor(ITextDocument2* This,LONG index,COLORREF *cr) {
    return This->lpVtbl->GetEffectColor(This,index,cr);
}
static inline HRESULT ITextDocument2_GetImmContext(ITextDocument2* This,LONG *context) {
    return This->lpVtbl->GetImmContext(This,context);
}
static inline HRESULT ITextDocument2_GetPreferredFont(ITextDocument2* This,LONG cp,LONG codepage,LONG option,LONG current_codepage,LONG current_fontsize,BSTR *bstr,LONG *pitch_family,LONG *new_fontsize) {
    return This->lpVtbl->GetPreferredFont(This,cp,codepage,option,current_codepage,current_fontsize,bstr,pitch_family,new_fontsize);
}
static inline HRESULT ITextDocument2_GetProperty(ITextDocument2* This,LONG type,LONG *value) {
    return This->lpVtbl->GetProperty(This,type,value);
}
static inline HRESULT ITextDocument2_GetStrings(ITextDocument2* This,ITextStrings **strings) {
    return This->lpVtbl->GetStrings(This,strings);
}
static inline HRESULT ITextDocument2_Notify(ITextDocument2* This,LONG notify) {
    return This->lpVtbl->Notify(This,notify);
}
static inline HRESULT ITextDocument2_Range2(ITextDocument2* This,LONG cp_active,LONG cp_anchor,ITextRange2 **range) {
    return This->lpVtbl->Range2(This,cp_active,cp_anchor,range);
}
static inline HRESULT ITextDocument2_RangeFromPoint2(ITextDocument2* This,LONG x,LONG y,LONG type,ITextRange2 **range) {
    return This->lpVtbl->RangeFromPoint2(This,x,y,type,range);
}
static inline HRESULT ITextDocument2_ReleaseCallManager(ITextDocument2* This,IUnknown *manager) {
    return This->lpVtbl->ReleaseCallManager(This,manager);
}
static inline HRESULT ITextDocument2_ReleaseImmContext(ITextDocument2* This,LONG context) {
    return This->lpVtbl->ReleaseImmContext(This,context);
}
static inline HRESULT ITextDocument2_SetEffectColor(ITextDocument2* This,LONG index,LONG value) {
    return This->lpVtbl->SetEffectColor(This,index,value);
}
static inline HRESULT ITextDocument2_SetProperty(ITextDocument2* This,LONG type,LONG value) {
    return This->lpVtbl->SetProperty(This,type,value);
}
static inline HRESULT ITextDocument2_SetTypographyOptions(ITextDocument2* This,LONG options,LONG mask) {
    return This->lpVtbl->SetTypographyOptions(This,options,mask);
}
static inline HRESULT ITextDocument2_SysBeep(ITextDocument2* This) {
    return This->lpVtbl->SysBeep(This);
}
static inline HRESULT ITextDocument2_Update(ITextDocument2* This,LONG value) {
    return This->lpVtbl->Update(This,value);
}
static inline HRESULT ITextDocument2_UpdateWindow(ITextDocument2* This) {
    return This->lpVtbl->UpdateWindow(This);
}
static inline HRESULT ITextDocument2_GetMathProperties(ITextDocument2* This,LONG *options) {
    return This->lpVtbl->GetMathProperties(This,options);
}
static inline HRESULT ITextDocument2_SetMathProperties(ITextDocument2* This,LONG options,LONG mask) {
    return This->lpVtbl->SetMathProperties(This,options,mask);
}
static inline HRESULT ITextDocument2_GetActiveStory(ITextDocument2* This,ITextStory **story) {
    return This->lpVtbl->GetActiveStory(This,story);
}
static inline HRESULT ITextDocument2_SetActiveStory(ITextDocument2* This,ITextStory *story) {
    return This->lpVtbl->SetActiveStory(This,story);
}
static inline HRESULT ITextDocument2_GetMainStory(ITextDocument2* This,ITextStory **story) {
    return This->lpVtbl->GetMainStory(This,story);
}
static inline HRESULT ITextDocument2_GetNewStory(ITextDocument2* This,ITextStory **story) {
    return This->lpVtbl->GetNewStory(This,story);
}
static inline HRESULT ITextDocument2_GetStory(ITextDocument2* This,LONG index,ITextStory **story) {
    return This->lpVtbl->GetStory(This,index,story);
}
#endif
#endif

#endif


#endif  /* __ITextDocument2_INTERFACE_DEFINED__ */

#ifndef __ITextFont_FWD_DEFINED__
#define __ITextFont_FWD_DEFINED__
typedef interface ITextFont ITextFont;
#ifdef __cplusplus
interface ITextFont;
#endif /* __cplusplus */
#endif

#ifndef __ITextPara_FWD_DEFINED__
#define __ITextPara_FWD_DEFINED__
typedef interface ITextPara ITextPara;
#ifdef __cplusplus
interface ITextPara;
#endif /* __cplusplus */
#endif

/*****************************************************************************
 * ITextRange interface
 */
#ifndef __ITextRange_INTERFACE_DEFINED__
#define __ITextRange_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextRange, 0x8cc497c2, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8cc497c2-a1df-11ce-8098-00aa0047be5d")
ITextRange : public IDispatch
{
    virtual HRESULT STDMETHODCALLTYPE GetText(
        BSTR *pbstr) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetText(
        BSTR bstr) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetChar(
        LONG *pch) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetChar(
        LONG ch) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDuplicate(
        ITextRange **ppRange) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFormattedText(
        ITextRange **ppRange) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetFormattedText(
        ITextRange *pRange) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStart(
        LONG *pcpFirst) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStart(
        LONG cpFirst) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEnd(
        LONG *pcpLim) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetEnd(
        LONG cpLim) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFont(
        ITextFont **pFont) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetFont(
        ITextFont *pFont) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPara(
        ITextPara **ppPara) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPara(
        ITextPara *pPara) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStoryLength(
        LONG *pcch) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStoryType(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE Collapse(
        LONG bStart) = 0;

    virtual HRESULT STDMETHODCALLTYPE Expand(
        LONG Unit,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetIndex(
        LONG Unit,
        LONG *pIndex) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetIndex(
        LONG Unit,
        LONG Index,
        LONG Extend) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetRange(
        LONG anchor,
        LONG active) = 0;

    virtual HRESULT STDMETHODCALLTYPE InRange(
        ITextRange *pRange,
        LONG *pb) = 0;

    virtual HRESULT STDMETHODCALLTYPE InStory(
        ITextRange *pRange,
        LONG *pb) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEqual(
        ITextRange *pRange,
        LONG *pb) = 0;

    virtual HRESULT STDMETHODCALLTYPE Select(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE StartOf(
        LONG Unit,
        LONG Extend,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE EndOf(
        LONG Unit,
        LONG Extend,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE Move(
        LONG Unit,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveStart(
        LONG Unit,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveEnd(
        LONG Unit,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveWhile(
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveStartWhile(
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveEndWhile(
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveUntil(
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveStartUntil(
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveEndUntil(
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE FindText(
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength) = 0;

    virtual HRESULT STDMETHODCALLTYPE FindTextStart(
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength) = 0;

    virtual HRESULT STDMETHODCALLTYPE FindTextEnd(
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength) = 0;

    virtual HRESULT STDMETHODCALLTYPE Delete(
        LONG Unit,
        LONG Count,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE Cut(
        VARIANT *pVar) = 0;

    virtual HRESULT STDMETHODCALLTYPE Copy(
        VARIANT *pVar) = 0;

    virtual HRESULT STDMETHODCALLTYPE Paste(
        VARIANT *pVar,
        LONG Format) = 0;

    virtual HRESULT STDMETHODCALLTYPE CanPaste(
        VARIANT *pVar,
        LONG Format,
        LONG *pb) = 0;

    virtual HRESULT STDMETHODCALLTYPE CanEdit(
        LONG *pb) = 0;

    virtual HRESULT STDMETHODCALLTYPE ChangeCase(
        LONG Type) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPoint(
        LONG Type,
        LONG *cx,
        LONG *cy) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPoint(
        LONG x,
        LONG y,
        LONG Type,
        LONG Extend) = 0;

    virtual HRESULT STDMETHODCALLTYPE ScrollIntoView(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEmbeddedObject(
        IUnknown **ppv) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextRange, 0x8cc497c2, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d)
#endif
#else
typedef struct ITextRangeVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextRange *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextRange *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextRange *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextRange *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextRange *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextRange *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextRange *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextRange methods ***/
    HRESULT (STDMETHODCALLTYPE *GetText)(
        ITextRange *This,
        BSTR *pbstr);

    HRESULT (STDMETHODCALLTYPE *SetText)(
        ITextRange *This,
        BSTR bstr);

    HRESULT (STDMETHODCALLTYPE *GetChar)(
        ITextRange *This,
        LONG *pch);

    HRESULT (STDMETHODCALLTYPE *SetChar)(
        ITextRange *This,
        LONG ch);

    HRESULT (STDMETHODCALLTYPE *GetDuplicate)(
        ITextRange *This,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *GetFormattedText)(
        ITextRange *This,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *SetFormattedText)(
        ITextRange *This,
        ITextRange *pRange);

    HRESULT (STDMETHODCALLTYPE *GetStart)(
        ITextRange *This,
        LONG *pcpFirst);

    HRESULT (STDMETHODCALLTYPE *SetStart)(
        ITextRange *This,
        LONG cpFirst);

    HRESULT (STDMETHODCALLTYPE *GetEnd)(
        ITextRange *This,
        LONG *pcpLim);

    HRESULT (STDMETHODCALLTYPE *SetEnd)(
        ITextRange *This,
        LONG cpLim);

    HRESULT (STDMETHODCALLTYPE *GetFont)(
        ITextRange *This,
        ITextFont **pFont);

    HRESULT (STDMETHODCALLTYPE *SetFont)(
        ITextRange *This,
        ITextFont *pFont);

    HRESULT (STDMETHODCALLTYPE *GetPara)(
        ITextRange *This,
        ITextPara **ppPara);

    HRESULT (STDMETHODCALLTYPE *SetPara)(
        ITextRange *This,
        ITextPara *pPara);

    HRESULT (STDMETHODCALLTYPE *GetStoryLength)(
        ITextRange *This,
        LONG *pcch);

    HRESULT (STDMETHODCALLTYPE *GetStoryType)(
        ITextRange *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *Collapse)(
        ITextRange *This,
        LONG bStart);

    HRESULT (STDMETHODCALLTYPE *Expand)(
        ITextRange *This,
        LONG Unit,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *GetIndex)(
        ITextRange *This,
        LONG Unit,
        LONG *pIndex);

    HRESULT (STDMETHODCALLTYPE *SetIndex)(
        ITextRange *This,
        LONG Unit,
        LONG Index,
        LONG Extend);

    HRESULT (STDMETHODCALLTYPE *SetRange)(
        ITextRange *This,
        LONG anchor,
        LONG active);

    HRESULT (STDMETHODCALLTYPE *InRange)(
        ITextRange *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *InStory)(
        ITextRange *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *IsEqual)(
        ITextRange *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *Select)(
        ITextRange *This);

    HRESULT (STDMETHODCALLTYPE *StartOf)(
        ITextRange *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *EndOf)(
        ITextRange *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *Move)(
        ITextRange *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStart)(
        ITextRange *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEnd)(
        ITextRange *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveWhile)(
        ITextRange *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStartWhile)(
        ITextRange *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEndWhile)(
        ITextRange *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveUntil)(
        ITextRange *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStartUntil)(
        ITextRange *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEndUntil)(
        ITextRange *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *FindText)(
        ITextRange *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *FindTextStart)(
        ITextRange *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *FindTextEnd)(
        ITextRange *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *Delete)(
        ITextRange *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *Cut)(
        ITextRange *This,
        VARIANT *pVar);

    HRESULT (STDMETHODCALLTYPE *Copy)(
        ITextRange *This,
        VARIANT *pVar);

    HRESULT (STDMETHODCALLTYPE *Paste)(
        ITextRange *This,
        VARIANT *pVar,
        LONG Format);

    HRESULT (STDMETHODCALLTYPE *CanPaste)(
        ITextRange *This,
        VARIANT *pVar,
        LONG Format,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *CanEdit)(
        ITextRange *This,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *ChangeCase)(
        ITextRange *This,
        LONG Type);

    HRESULT (STDMETHODCALLTYPE *GetPoint)(
        ITextRange *This,
        LONG Type,
        LONG *cx,
        LONG *cy);

    HRESULT (STDMETHODCALLTYPE *SetPoint)(
        ITextRange *This,
        LONG x,
        LONG y,
        LONG Type,
        LONG Extend);

    HRESULT (STDMETHODCALLTYPE *ScrollIntoView)(
        ITextRange *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetEmbeddedObject)(
        ITextRange *This,
        IUnknown **ppv);

    END_INTERFACE
} ITextRangeVtbl;

interface ITextRange {
    CONST_VTBL ITextRangeVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextRange_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextRange_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextRange_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextRange_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextRange_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextRange_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextRange_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextRange methods ***/
#define ITextRange_GetText(This,pbstr) (This)->lpVtbl->GetText(This,pbstr)
#define ITextRange_SetText(This,bstr) (This)->lpVtbl->SetText(This,bstr)
#define ITextRange_GetChar(This,pch) (This)->lpVtbl->GetChar(This,pch)
#define ITextRange_SetChar(This,ch) (This)->lpVtbl->SetChar(This,ch)
#define ITextRange_GetDuplicate(This,ppRange) (This)->lpVtbl->GetDuplicate(This,ppRange)
#define ITextRange_GetFormattedText(This,ppRange) (This)->lpVtbl->GetFormattedText(This,ppRange)
#define ITextRange_SetFormattedText(This,pRange) (This)->lpVtbl->SetFormattedText(This,pRange)
#define ITextRange_GetStart(This,pcpFirst) (This)->lpVtbl->GetStart(This,pcpFirst)
#define ITextRange_SetStart(This,cpFirst) (This)->lpVtbl->SetStart(This,cpFirst)
#define ITextRange_GetEnd(This,pcpLim) (This)->lpVtbl->GetEnd(This,pcpLim)
#define ITextRange_SetEnd(This,cpLim) (This)->lpVtbl->SetEnd(This,cpLim)
#define ITextRange_GetFont(This,pFont) (This)->lpVtbl->GetFont(This,pFont)
#define ITextRange_SetFont(This,pFont) (This)->lpVtbl->SetFont(This,pFont)
#define ITextRange_GetPara(This,ppPara) (This)->lpVtbl->GetPara(This,ppPara)
#define ITextRange_SetPara(This,pPara) (This)->lpVtbl->SetPara(This,pPara)
#define ITextRange_GetStoryLength(This,pcch) (This)->lpVtbl->GetStoryLength(This,pcch)
#define ITextRange_GetStoryType(This,pValue) (This)->lpVtbl->GetStoryType(This,pValue)
#define ITextRange_Collapse(This,bStart) (This)->lpVtbl->Collapse(This,bStart)
#define ITextRange_Expand(This,Unit,pDelta) (This)->lpVtbl->Expand(This,Unit,pDelta)
#define ITextRange_GetIndex(This,Unit,pIndex) (This)->lpVtbl->GetIndex(This,Unit,pIndex)
#define ITextRange_SetIndex(This,Unit,Index,Extend) (This)->lpVtbl->SetIndex(This,Unit,Index,Extend)
#define ITextRange_SetRange(This,anchor,active) (This)->lpVtbl->SetRange(This,anchor,active)
#define ITextRange_InRange(This,pRange,pb) (This)->lpVtbl->InRange(This,pRange,pb)
#define ITextRange_InStory(This,pRange,pb) (This)->lpVtbl->InStory(This,pRange,pb)
#define ITextRange_IsEqual(This,pRange,pb) (This)->lpVtbl->IsEqual(This,pRange,pb)
#define ITextRange_Select(This) (This)->lpVtbl->Select(This)
#define ITextRange_StartOf(This,Unit,Extend,pDelta) (This)->lpVtbl->StartOf(This,Unit,Extend,pDelta)
#define ITextRange_EndOf(This,Unit,Extend,pDelta) (This)->lpVtbl->EndOf(This,Unit,Extend,pDelta)
#define ITextRange_Move(This,Unit,Count,pDelta) (This)->lpVtbl->Move(This,Unit,Count,pDelta)
#define ITextRange_MoveStart(This,Unit,Count,pDelta) (This)->lpVtbl->MoveStart(This,Unit,Count,pDelta)
#define ITextRange_MoveEnd(This,Unit,Count,pDelta) (This)->lpVtbl->MoveEnd(This,Unit,Count,pDelta)
#define ITextRange_MoveWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveWhile(This,Cset,Count,pDelta)
#define ITextRange_MoveStartWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveStartWhile(This,Cset,Count,pDelta)
#define ITextRange_MoveEndWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveEndWhile(This,Cset,Count,pDelta)
#define ITextRange_MoveUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveUntil(This,Cset,Count,pDelta)
#define ITextRange_MoveStartUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveStartUntil(This,Cset,Count,pDelta)
#define ITextRange_MoveEndUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveEndUntil(This,Cset,Count,pDelta)
#define ITextRange_FindText(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindText(This,bstr,cch,Flags,pLength)
#define ITextRange_FindTextStart(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindTextStart(This,bstr,cch,Flags,pLength)
#define ITextRange_FindTextEnd(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindTextEnd(This,bstr,cch,Flags,pLength)
#define ITextRange_Delete(This,Unit,Count,pDelta) (This)->lpVtbl->Delete(This,Unit,Count,pDelta)
#define ITextRange_Cut(This,pVar) (This)->lpVtbl->Cut(This,pVar)
#define ITextRange_Copy(This,pVar) (This)->lpVtbl->Copy(This,pVar)
#define ITextRange_Paste(This,pVar,Format) (This)->lpVtbl->Paste(This,pVar,Format)
#define ITextRange_CanPaste(This,pVar,Format,pb) (This)->lpVtbl->CanPaste(This,pVar,Format,pb)
#define ITextRange_CanEdit(This,pb) (This)->lpVtbl->CanEdit(This,pb)
#define ITextRange_ChangeCase(This,Type) (This)->lpVtbl->ChangeCase(This,Type)
#define ITextRange_GetPoint(This,Type,cx,cy) (This)->lpVtbl->GetPoint(This,Type,cx,cy)
#define ITextRange_SetPoint(This,x,y,Type,Extend) (This)->lpVtbl->SetPoint(This,x,y,Type,Extend)
#define ITextRange_ScrollIntoView(This,Value) (This)->lpVtbl->ScrollIntoView(This,Value)
#define ITextRange_GetEmbeddedObject(This,ppv) (This)->lpVtbl->GetEmbeddedObject(This,ppv)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextRange_QueryInterface(ITextRange* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextRange_AddRef(ITextRange* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextRange_Release(ITextRange* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextRange_GetTypeInfoCount(ITextRange* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextRange_GetTypeInfo(ITextRange* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextRange_GetIDsOfNames(ITextRange* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextRange_Invoke(ITextRange* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextRange methods ***/
static inline HRESULT ITextRange_GetText(ITextRange* This,BSTR *pbstr) {
    return This->lpVtbl->GetText(This,pbstr);
}
static inline HRESULT ITextRange_SetText(ITextRange* This,BSTR bstr) {
    return This->lpVtbl->SetText(This,bstr);
}
static inline HRESULT ITextRange_GetChar(ITextRange* This,LONG *pch) {
    return This->lpVtbl->GetChar(This,pch);
}
static inline HRESULT ITextRange_SetChar(ITextRange* This,LONG ch) {
    return This->lpVtbl->SetChar(This,ch);
}
static inline HRESULT ITextRange_GetDuplicate(ITextRange* This,ITextRange **ppRange) {
    return This->lpVtbl->GetDuplicate(This,ppRange);
}
static inline HRESULT ITextRange_GetFormattedText(ITextRange* This,ITextRange **ppRange) {
    return This->lpVtbl->GetFormattedText(This,ppRange);
}
static inline HRESULT ITextRange_SetFormattedText(ITextRange* This,ITextRange *pRange) {
    return This->lpVtbl->SetFormattedText(This,pRange);
}
static inline HRESULT ITextRange_GetStart(ITextRange* This,LONG *pcpFirst) {
    return This->lpVtbl->GetStart(This,pcpFirst);
}
static inline HRESULT ITextRange_SetStart(ITextRange* This,LONG cpFirst) {
    return This->lpVtbl->SetStart(This,cpFirst);
}
static inline HRESULT ITextRange_GetEnd(ITextRange* This,LONG *pcpLim) {
    return This->lpVtbl->GetEnd(This,pcpLim);
}
static inline HRESULT ITextRange_SetEnd(ITextRange* This,LONG cpLim) {
    return This->lpVtbl->SetEnd(This,cpLim);
}
static inline HRESULT ITextRange_GetFont(ITextRange* This,ITextFont **pFont) {
    return This->lpVtbl->GetFont(This,pFont);
}
static inline HRESULT ITextRange_SetFont(ITextRange* This,ITextFont *pFont) {
    return This->lpVtbl->SetFont(This,pFont);
}
static inline HRESULT ITextRange_GetPara(ITextRange* This,ITextPara **ppPara) {
    return This->lpVtbl->GetPara(This,ppPara);
}
static inline HRESULT ITextRange_SetPara(ITextRange* This,ITextPara *pPara) {
    return This->lpVtbl->SetPara(This,pPara);
}
static inline HRESULT ITextRange_GetStoryLength(ITextRange* This,LONG *pcch) {
    return This->lpVtbl->GetStoryLength(This,pcch);
}
static inline HRESULT ITextRange_GetStoryType(ITextRange* This,LONG *pValue) {
    return This->lpVtbl->GetStoryType(This,pValue);
}
static inline HRESULT ITextRange_Collapse(ITextRange* This,LONG bStart) {
    return This->lpVtbl->Collapse(This,bStart);
}
static inline HRESULT ITextRange_Expand(ITextRange* This,LONG Unit,LONG *pDelta) {
    return This->lpVtbl->Expand(This,Unit,pDelta);
}
static inline HRESULT ITextRange_GetIndex(ITextRange* This,LONG Unit,LONG *pIndex) {
    return This->lpVtbl->GetIndex(This,Unit,pIndex);
}
static inline HRESULT ITextRange_SetIndex(ITextRange* This,LONG Unit,LONG Index,LONG Extend) {
    return This->lpVtbl->SetIndex(This,Unit,Index,Extend);
}
static inline HRESULT ITextRange_SetRange(ITextRange* This,LONG anchor,LONG active) {
    return This->lpVtbl->SetRange(This,anchor,active);
}
static inline HRESULT ITextRange_InRange(ITextRange* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->InRange(This,pRange,pb);
}
static inline HRESULT ITextRange_InStory(ITextRange* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->InStory(This,pRange,pb);
}
static inline HRESULT ITextRange_IsEqual(ITextRange* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->IsEqual(This,pRange,pb);
}
static inline HRESULT ITextRange_Select(ITextRange* This) {
    return This->lpVtbl->Select(This);
}
static inline HRESULT ITextRange_StartOf(ITextRange* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->StartOf(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextRange_EndOf(ITextRange* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->EndOf(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextRange_Move(ITextRange* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->Move(This,Unit,Count,pDelta);
}
static inline HRESULT ITextRange_MoveStart(ITextRange* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStart(This,Unit,Count,pDelta);
}
static inline HRESULT ITextRange_MoveEnd(ITextRange* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEnd(This,Unit,Count,pDelta);
}
static inline HRESULT ITextRange_MoveWhile(ITextRange* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange_MoveStartWhile(ITextRange* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStartWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange_MoveEndWhile(ITextRange* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEndWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange_MoveUntil(ITextRange* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange_MoveStartUntil(ITextRange* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStartUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange_MoveEndUntil(ITextRange* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEndUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange_FindText(ITextRange* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindText(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextRange_FindTextStart(ITextRange* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindTextStart(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextRange_FindTextEnd(ITextRange* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindTextEnd(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextRange_Delete(ITextRange* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->Delete(This,Unit,Count,pDelta);
}
static inline HRESULT ITextRange_Cut(ITextRange* This,VARIANT *pVar) {
    return This->lpVtbl->Cut(This,pVar);
}
static inline HRESULT ITextRange_Copy(ITextRange* This,VARIANT *pVar) {
    return This->lpVtbl->Copy(This,pVar);
}
static inline HRESULT ITextRange_Paste(ITextRange* This,VARIANT *pVar,LONG Format) {
    return This->lpVtbl->Paste(This,pVar,Format);
}
static inline HRESULT ITextRange_CanPaste(ITextRange* This,VARIANT *pVar,LONG Format,LONG *pb) {
    return This->lpVtbl->CanPaste(This,pVar,Format,pb);
}
static inline HRESULT ITextRange_CanEdit(ITextRange* This,LONG *pb) {
    return This->lpVtbl->CanEdit(This,pb);
}
static inline HRESULT ITextRange_ChangeCase(ITextRange* This,LONG Type) {
    return This->lpVtbl->ChangeCase(This,Type);
}
static inline HRESULT ITextRange_GetPoint(ITextRange* This,LONG Type,LONG *cx,LONG *cy) {
    return This->lpVtbl->GetPoint(This,Type,cx,cy);
}
static inline HRESULT ITextRange_SetPoint(ITextRange* This,LONG x,LONG y,LONG Type,LONG Extend) {
    return This->lpVtbl->SetPoint(This,x,y,Type,Extend);
}
static inline HRESULT ITextRange_ScrollIntoView(ITextRange* This,LONG Value) {
    return This->lpVtbl->ScrollIntoView(This,Value);
}
static inline HRESULT ITextRange_GetEmbeddedObject(ITextRange* This,IUnknown **ppv) {
    return This->lpVtbl->GetEmbeddedObject(This,ppv);
}
#endif
#endif

#endif


#endif  /* __ITextRange_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITextSelection interface
 */
#ifndef __ITextSelection_INTERFACE_DEFINED__
#define __ITextSelection_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8cc497c1-a1df-11ce-8098-00aa0047be5d")
ITextSelection : public ITextRange
{
    virtual HRESULT STDMETHODCALLTYPE GetFlags(
        LONG *pFlags) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetFlags(
        LONG Flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetType(
        LONG *pType) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveLeft(
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveRight(
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveUp(
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE MoveDown(
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE HomeKey(
        LONG Unit,
        LONG Extend,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE EndKey(
        LONG Unit,
        LONG Extend,
        LONG *pDelta) = 0;

    virtual HRESULT STDMETHODCALLTYPE TypeText(
        BSTR bstr) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d)
#endif
#else
typedef struct ITextSelectionVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextSelection *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextSelection *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextSelection *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextSelection *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextSelection *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextSelection *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextSelection *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextRange methods ***/
    HRESULT (STDMETHODCALLTYPE *GetText)(
        ITextSelection *This,
        BSTR *pbstr);

    HRESULT (STDMETHODCALLTYPE *SetText)(
        ITextSelection *This,
        BSTR bstr);

    HRESULT (STDMETHODCALLTYPE *GetChar)(
        ITextSelection *This,
        LONG *pch);

    HRESULT (STDMETHODCALLTYPE *SetChar)(
        ITextSelection *This,
        LONG ch);

    HRESULT (STDMETHODCALLTYPE *GetDuplicate)(
        ITextSelection *This,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *GetFormattedText)(
        ITextSelection *This,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *SetFormattedText)(
        ITextSelection *This,
        ITextRange *pRange);

    HRESULT (STDMETHODCALLTYPE *GetStart)(
        ITextSelection *This,
        LONG *pcpFirst);

    HRESULT (STDMETHODCALLTYPE *SetStart)(
        ITextSelection *This,
        LONG cpFirst);

    HRESULT (STDMETHODCALLTYPE *GetEnd)(
        ITextSelection *This,
        LONG *pcpLim);

    HRESULT (STDMETHODCALLTYPE *SetEnd)(
        ITextSelection *This,
        LONG cpLim);

    HRESULT (STDMETHODCALLTYPE *GetFont)(
        ITextSelection *This,
        ITextFont **pFont);

    HRESULT (STDMETHODCALLTYPE *SetFont)(
        ITextSelection *This,
        ITextFont *pFont);

    HRESULT (STDMETHODCALLTYPE *GetPara)(
        ITextSelection *This,
        ITextPara **ppPara);

    HRESULT (STDMETHODCALLTYPE *SetPara)(
        ITextSelection *This,
        ITextPara *pPara);

    HRESULT (STDMETHODCALLTYPE *GetStoryLength)(
        ITextSelection *This,
        LONG *pcch);

    HRESULT (STDMETHODCALLTYPE *GetStoryType)(
        ITextSelection *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *Collapse)(
        ITextSelection *This,
        LONG bStart);

    HRESULT (STDMETHODCALLTYPE *Expand)(
        ITextSelection *This,
        LONG Unit,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *GetIndex)(
        ITextSelection *This,
        LONG Unit,
        LONG *pIndex);

    HRESULT (STDMETHODCALLTYPE *SetIndex)(
        ITextSelection *This,
        LONG Unit,
        LONG Index,
        LONG Extend);

    HRESULT (STDMETHODCALLTYPE *SetRange)(
        ITextSelection *This,
        LONG anchor,
        LONG active);

    HRESULT (STDMETHODCALLTYPE *InRange)(
        ITextSelection *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *InStory)(
        ITextSelection *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *IsEqual)(
        ITextSelection *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *Select)(
        ITextSelection *This);

    HRESULT (STDMETHODCALLTYPE *StartOf)(
        ITextSelection *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *EndOf)(
        ITextSelection *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *Move)(
        ITextSelection *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStart)(
        ITextSelection *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEnd)(
        ITextSelection *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveWhile)(
        ITextSelection *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStartWhile)(
        ITextSelection *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEndWhile)(
        ITextSelection *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveUntil)(
        ITextSelection *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStartUntil)(
        ITextSelection *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEndUntil)(
        ITextSelection *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *FindText)(
        ITextSelection *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *FindTextStart)(
        ITextSelection *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *FindTextEnd)(
        ITextSelection *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *Delete)(
        ITextSelection *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *Cut)(
        ITextSelection *This,
        VARIANT *pVar);

    HRESULT (STDMETHODCALLTYPE *Copy)(
        ITextSelection *This,
        VARIANT *pVar);

    HRESULT (STDMETHODCALLTYPE *Paste)(
        ITextSelection *This,
        VARIANT *pVar,
        LONG Format);

    HRESULT (STDMETHODCALLTYPE *CanPaste)(
        ITextSelection *This,
        VARIANT *pVar,
        LONG Format,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *CanEdit)(
        ITextSelection *This,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *ChangeCase)(
        ITextSelection *This,
        LONG Type);

    HRESULT (STDMETHODCALLTYPE *GetPoint)(
        ITextSelection *This,
        LONG Type,
        LONG *cx,
        LONG *cy);

    HRESULT (STDMETHODCALLTYPE *SetPoint)(
        ITextSelection *This,
        LONG x,
        LONG y,
        LONG Type,
        LONG Extend);

    HRESULT (STDMETHODCALLTYPE *ScrollIntoView)(
        ITextSelection *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetEmbeddedObject)(
        ITextSelection *This,
        IUnknown **ppv);

    /*** ITextSelection methods ***/
    HRESULT (STDMETHODCALLTYPE *GetFlags)(
        ITextSelection *This,
        LONG *pFlags);

    HRESULT (STDMETHODCALLTYPE *SetFlags)(
        ITextSelection *This,
        LONG Flags);

    HRESULT (STDMETHODCALLTYPE *GetType)(
        ITextSelection *This,
        LONG *pType);

    HRESULT (STDMETHODCALLTYPE *MoveLeft)(
        ITextSelection *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveRight)(
        ITextSelection *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveUp)(
        ITextSelection *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveDown)(
        ITextSelection *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *HomeKey)(
        ITextSelection *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *EndKey)(
        ITextSelection *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *TypeText)(
        ITextSelection *This,
        BSTR bstr);

    END_INTERFACE
} ITextSelectionVtbl;

interface ITextSelection {
    CONST_VTBL ITextSelectionVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextSelection_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextSelection_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextSelection_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextSelection_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextSelection_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextSelection_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextSelection_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextRange methods ***/
#define ITextSelection_GetText(This,pbstr) (This)->lpVtbl->GetText(This,pbstr)
#define ITextSelection_SetText(This,bstr) (This)->lpVtbl->SetText(This,bstr)
#define ITextSelection_GetChar(This,pch) (This)->lpVtbl->GetChar(This,pch)
#define ITextSelection_SetChar(This,ch) (This)->lpVtbl->SetChar(This,ch)
#define ITextSelection_GetDuplicate(This,ppRange) (This)->lpVtbl->GetDuplicate(This,ppRange)
#define ITextSelection_GetFormattedText(This,ppRange) (This)->lpVtbl->GetFormattedText(This,ppRange)
#define ITextSelection_SetFormattedText(This,pRange) (This)->lpVtbl->SetFormattedText(This,pRange)
#define ITextSelection_GetStart(This,pcpFirst) (This)->lpVtbl->GetStart(This,pcpFirst)
#define ITextSelection_SetStart(This,cpFirst) (This)->lpVtbl->SetStart(This,cpFirst)
#define ITextSelection_GetEnd(This,pcpLim) (This)->lpVtbl->GetEnd(This,pcpLim)
#define ITextSelection_SetEnd(This,cpLim) (This)->lpVtbl->SetEnd(This,cpLim)
#define ITextSelection_GetFont(This,pFont) (This)->lpVtbl->GetFont(This,pFont)
#define ITextSelection_SetFont(This,pFont) (This)->lpVtbl->SetFont(This,pFont)
#define ITextSelection_GetPara(This,ppPara) (This)->lpVtbl->GetPara(This,ppPara)
#define ITextSelection_SetPara(This,pPara) (This)->lpVtbl->SetPara(This,pPara)
#define ITextSelection_GetStoryLength(This,pcch) (This)->lpVtbl->GetStoryLength(This,pcch)
#define ITextSelection_GetStoryType(This,pValue) (This)->lpVtbl->GetStoryType(This,pValue)
#define ITextSelection_Collapse(This,bStart) (This)->lpVtbl->Collapse(This,bStart)
#define ITextSelection_Expand(This,Unit,pDelta) (This)->lpVtbl->Expand(This,Unit,pDelta)
#define ITextSelection_GetIndex(This,Unit,pIndex) (This)->lpVtbl->GetIndex(This,Unit,pIndex)
#define ITextSelection_SetIndex(This,Unit,Index,Extend) (This)->lpVtbl->SetIndex(This,Unit,Index,Extend)
#define ITextSelection_SetRange(This,anchor,active) (This)->lpVtbl->SetRange(This,anchor,active)
#define ITextSelection_InRange(This,pRange,pb) (This)->lpVtbl->InRange(This,pRange,pb)
#define ITextSelection_InStory(This,pRange,pb) (This)->lpVtbl->InStory(This,pRange,pb)
#define ITextSelection_IsEqual(This,pRange,pb) (This)->lpVtbl->IsEqual(This,pRange,pb)
#define ITextSelection_Select(This) (This)->lpVtbl->Select(This)
#define ITextSelection_StartOf(This,Unit,Extend,pDelta) (This)->lpVtbl->StartOf(This,Unit,Extend,pDelta)
#define ITextSelection_EndOf(This,Unit,Extend,pDelta) (This)->lpVtbl->EndOf(This,Unit,Extend,pDelta)
#define ITextSelection_Move(This,Unit,Count,pDelta) (This)->lpVtbl->Move(This,Unit,Count,pDelta)
#define ITextSelection_MoveStart(This,Unit,Count,pDelta) (This)->lpVtbl->MoveStart(This,Unit,Count,pDelta)
#define ITextSelection_MoveEnd(This,Unit,Count,pDelta) (This)->lpVtbl->MoveEnd(This,Unit,Count,pDelta)
#define ITextSelection_MoveWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveWhile(This,Cset,Count,pDelta)
#define ITextSelection_MoveStartWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveStartWhile(This,Cset,Count,pDelta)
#define ITextSelection_MoveEndWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveEndWhile(This,Cset,Count,pDelta)
#define ITextSelection_MoveUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveUntil(This,Cset,Count,pDelta)
#define ITextSelection_MoveStartUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveStartUntil(This,Cset,Count,pDelta)
#define ITextSelection_MoveEndUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveEndUntil(This,Cset,Count,pDelta)
#define ITextSelection_FindText(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindText(This,bstr,cch,Flags,pLength)
#define ITextSelection_FindTextStart(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindTextStart(This,bstr,cch,Flags,pLength)
#define ITextSelection_FindTextEnd(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindTextEnd(This,bstr,cch,Flags,pLength)
#define ITextSelection_Delete(This,Unit,Count,pDelta) (This)->lpVtbl->Delete(This,Unit,Count,pDelta)
#define ITextSelection_Cut(This,pVar) (This)->lpVtbl->Cut(This,pVar)
#define ITextSelection_Copy(This,pVar) (This)->lpVtbl->Copy(This,pVar)
#define ITextSelection_Paste(This,pVar,Format) (This)->lpVtbl->Paste(This,pVar,Format)
#define ITextSelection_CanPaste(This,pVar,Format,pb) (This)->lpVtbl->CanPaste(This,pVar,Format,pb)
#define ITextSelection_CanEdit(This,pb) (This)->lpVtbl->CanEdit(This,pb)
#define ITextSelection_ChangeCase(This,Type) (This)->lpVtbl->ChangeCase(This,Type)
#define ITextSelection_GetPoint(This,Type,cx,cy) (This)->lpVtbl->GetPoint(This,Type,cx,cy)
#define ITextSelection_SetPoint(This,x,y,Type,Extend) (This)->lpVtbl->SetPoint(This,x,y,Type,Extend)
#define ITextSelection_ScrollIntoView(This,Value) (This)->lpVtbl->ScrollIntoView(This,Value)
#define ITextSelection_GetEmbeddedObject(This,ppv) (This)->lpVtbl->GetEmbeddedObject(This,ppv)
/*** ITextSelection methods ***/
#define ITextSelection_GetFlags(This,pFlags) (This)->lpVtbl->GetFlags(This,pFlags)
#define ITextSelection_SetFlags(This,Flags) (This)->lpVtbl->SetFlags(This,Flags)
#define ITextSelection_GetType(This,pType) (This)->lpVtbl->GetType(This,pType)
#define ITextSelection_MoveLeft(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveLeft(This,Unit,Count,Extend,pDelta)
#define ITextSelection_MoveRight(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveRight(This,Unit,Count,Extend,pDelta)
#define ITextSelection_MoveUp(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveUp(This,Unit,Count,Extend,pDelta)
#define ITextSelection_MoveDown(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveDown(This,Unit,Count,Extend,pDelta)
#define ITextSelection_HomeKey(This,Unit,Extend,pDelta) (This)->lpVtbl->HomeKey(This,Unit,Extend,pDelta)
#define ITextSelection_EndKey(This,Unit,Extend,pDelta) (This)->lpVtbl->EndKey(This,Unit,Extend,pDelta)
#define ITextSelection_TypeText(This,bstr) (This)->lpVtbl->TypeText(This,bstr)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextSelection_QueryInterface(ITextSelection* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextSelection_AddRef(ITextSelection* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextSelection_Release(ITextSelection* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextSelection_GetTypeInfoCount(ITextSelection* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextSelection_GetTypeInfo(ITextSelection* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextSelection_GetIDsOfNames(ITextSelection* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextSelection_Invoke(ITextSelection* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextRange methods ***/
static inline HRESULT ITextSelection_GetText(ITextSelection* This,BSTR *pbstr) {
    return This->lpVtbl->GetText(This,pbstr);
}
static inline HRESULT ITextSelection_SetText(ITextSelection* This,BSTR bstr) {
    return This->lpVtbl->SetText(This,bstr);
}
static inline HRESULT ITextSelection_GetChar(ITextSelection* This,LONG *pch) {
    return This->lpVtbl->GetChar(This,pch);
}
static inline HRESULT ITextSelection_SetChar(ITextSelection* This,LONG ch) {
    return This->lpVtbl->SetChar(This,ch);
}
static inline HRESULT ITextSelection_GetDuplicate(ITextSelection* This,ITextRange **ppRange) {
    return This->lpVtbl->GetDuplicate(This,ppRange);
}
static inline HRESULT ITextSelection_GetFormattedText(ITextSelection* This,ITextRange **ppRange) {
    return This->lpVtbl->GetFormattedText(This,ppRange);
}
static inline HRESULT ITextSelection_SetFormattedText(ITextSelection* This,ITextRange *pRange) {
    return This->lpVtbl->SetFormattedText(This,pRange);
}
static inline HRESULT ITextSelection_GetStart(ITextSelection* This,LONG *pcpFirst) {
    return This->lpVtbl->GetStart(This,pcpFirst);
}
static inline HRESULT ITextSelection_SetStart(ITextSelection* This,LONG cpFirst) {
    return This->lpVtbl->SetStart(This,cpFirst);
}
static inline HRESULT ITextSelection_GetEnd(ITextSelection* This,LONG *pcpLim) {
    return This->lpVtbl->GetEnd(This,pcpLim);
}
static inline HRESULT ITextSelection_SetEnd(ITextSelection* This,LONG cpLim) {
    return This->lpVtbl->SetEnd(This,cpLim);
}
static inline HRESULT ITextSelection_GetFont(ITextSelection* This,ITextFont **pFont) {
    return This->lpVtbl->GetFont(This,pFont);
}
static inline HRESULT ITextSelection_SetFont(ITextSelection* This,ITextFont *pFont) {
    return This->lpVtbl->SetFont(This,pFont);
}
static inline HRESULT ITextSelection_GetPara(ITextSelection* This,ITextPara **ppPara) {
    return This->lpVtbl->GetPara(This,ppPara);
}
static inline HRESULT ITextSelection_SetPara(ITextSelection* This,ITextPara *pPara) {
    return This->lpVtbl->SetPara(This,pPara);
}
static inline HRESULT ITextSelection_GetStoryLength(ITextSelection* This,LONG *pcch) {
    return This->lpVtbl->GetStoryLength(This,pcch);
}
static inline HRESULT ITextSelection_GetStoryType(ITextSelection* This,LONG *pValue) {
    return This->lpVtbl->GetStoryType(This,pValue);
}
static inline HRESULT ITextSelection_Collapse(ITextSelection* This,LONG bStart) {
    return This->lpVtbl->Collapse(This,bStart);
}
static inline HRESULT ITextSelection_Expand(ITextSelection* This,LONG Unit,LONG *pDelta) {
    return This->lpVtbl->Expand(This,Unit,pDelta);
}
static inline HRESULT ITextSelection_GetIndex(ITextSelection* This,LONG Unit,LONG *pIndex) {
    return This->lpVtbl->GetIndex(This,Unit,pIndex);
}
static inline HRESULT ITextSelection_SetIndex(ITextSelection* This,LONG Unit,LONG Index,LONG Extend) {
    return This->lpVtbl->SetIndex(This,Unit,Index,Extend);
}
static inline HRESULT ITextSelection_SetRange(ITextSelection* This,LONG anchor,LONG active) {
    return This->lpVtbl->SetRange(This,anchor,active);
}
static inline HRESULT ITextSelection_InRange(ITextSelection* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->InRange(This,pRange,pb);
}
static inline HRESULT ITextSelection_InStory(ITextSelection* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->InStory(This,pRange,pb);
}
static inline HRESULT ITextSelection_IsEqual(ITextSelection* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->IsEqual(This,pRange,pb);
}
static inline HRESULT ITextSelection_Select(ITextSelection* This) {
    return This->lpVtbl->Select(This);
}
static inline HRESULT ITextSelection_StartOf(ITextSelection* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->StartOf(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextSelection_EndOf(ITextSelection* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->EndOf(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextSelection_Move(ITextSelection* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->Move(This,Unit,Count,pDelta);
}
static inline HRESULT ITextSelection_MoveStart(ITextSelection* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStart(This,Unit,Count,pDelta);
}
static inline HRESULT ITextSelection_MoveEnd(ITextSelection* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEnd(This,Unit,Count,pDelta);
}
static inline HRESULT ITextSelection_MoveWhile(ITextSelection* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection_MoveStartWhile(ITextSelection* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStartWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection_MoveEndWhile(ITextSelection* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEndWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection_MoveUntil(ITextSelection* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection_MoveStartUntil(ITextSelection* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStartUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection_MoveEndUntil(ITextSelection* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEndUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection_FindText(ITextSelection* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindText(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextSelection_FindTextStart(ITextSelection* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindTextStart(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextSelection_FindTextEnd(ITextSelection* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindTextEnd(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextSelection_Delete(ITextSelection* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->Delete(This,Unit,Count,pDelta);
}
static inline HRESULT ITextSelection_Cut(ITextSelection* This,VARIANT *pVar) {
    return This->lpVtbl->Cut(This,pVar);
}
static inline HRESULT ITextSelection_Copy(ITextSelection* This,VARIANT *pVar) {
    return This->lpVtbl->Copy(This,pVar);
}
static inline HRESULT ITextSelection_Paste(ITextSelection* This,VARIANT *pVar,LONG Format) {
    return This->lpVtbl->Paste(This,pVar,Format);
}
static inline HRESULT ITextSelection_CanPaste(ITextSelection* This,VARIANT *pVar,LONG Format,LONG *pb) {
    return This->lpVtbl->CanPaste(This,pVar,Format,pb);
}
static inline HRESULT ITextSelection_CanEdit(ITextSelection* This,LONG *pb) {
    return This->lpVtbl->CanEdit(This,pb);
}
static inline HRESULT ITextSelection_ChangeCase(ITextSelection* This,LONG Type) {
    return This->lpVtbl->ChangeCase(This,Type);
}
static inline HRESULT ITextSelection_GetPoint(ITextSelection* This,LONG Type,LONG *cx,LONG *cy) {
    return This->lpVtbl->GetPoint(This,Type,cx,cy);
}
static inline HRESULT ITextSelection_SetPoint(ITextSelection* This,LONG x,LONG y,LONG Type,LONG Extend) {
    return This->lpVtbl->SetPoint(This,x,y,Type,Extend);
}
static inline HRESULT ITextSelection_ScrollIntoView(ITextSelection* This,LONG Value) {
    return This->lpVtbl->ScrollIntoView(This,Value);
}
static inline HRESULT ITextSelection_GetEmbeddedObject(ITextSelection* This,IUnknown **ppv) {
    return This->lpVtbl->GetEmbeddedObject(This,ppv);
}
/*** ITextSelection methods ***/
static inline HRESULT ITextSelection_GetFlags(ITextSelection* This,LONG *pFlags) {
    return This->lpVtbl->GetFlags(This,pFlags);
}
static inline HRESULT ITextSelection_SetFlags(ITextSelection* This,LONG Flags) {
    return This->lpVtbl->SetFlags(This,Flags);
}
static inline HRESULT ITextSelection_GetType(ITextSelection* This,LONG *pType) {
    return This->lpVtbl->GetType(This,pType);
}
static inline HRESULT ITextSelection_MoveLeft(ITextSelection* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveLeft(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextSelection_MoveRight(ITextSelection* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveRight(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextSelection_MoveUp(ITextSelection* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveUp(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextSelection_MoveDown(ITextSelection* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveDown(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextSelection_HomeKey(ITextSelection* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->HomeKey(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextSelection_EndKey(ITextSelection* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->EndKey(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextSelection_TypeText(ITextSelection* This,BSTR bstr) {
    return This->lpVtbl->TypeText(This,bstr);
}
#endif
#endif

#endif


#endif  /* __ITextSelection_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITextRange2 interface
 */
#ifndef __ITextRange2_INTERFACE_DEFINED__
#define __ITextRange2_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextRange2, 0xc241f5e2, 0x7206, 0x11d8, 0xa2,0xc7, 0x00,0xa0,0xd1,0xd6,0xc6,0xb3);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("c241f5e2-7206-11d8-a2c7-00a0d1d6c6b3")
ITextRange2 : public ITextSelection
{
    virtual HRESULT STDMETHODCALLTYPE GetCch(
        LONG *count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCells(
        IUnknown **cells) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetColumn(
        IUnknown **column) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCount(
        LONG *count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDuplicate2(
        ITextRange2 **range) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFont2(
        ITextFont2 **font) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetFont2(
        ITextFont2 *font) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFormattedText2(
        ITextRange2 **range) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetFormattedText2(
        ITextRange2 *range) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetGravity(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetGravity(
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPara2(
        ITextPara2 **para) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPara2(
        ITextPara2 *para) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRow(
        ITextRow **row) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStartPara(
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTable(
        IUnknown **table) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetURL(
        BSTR *url) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetURL(
        BSTR url) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddSubrange(
        LONG cp1,
        LONG cp2,
        LONG activate) = 0;

    virtual HRESULT STDMETHODCALLTYPE BuildUpMath(
        LONG flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE DeleteSubrange(
        LONG first,
        LONG lim) = 0;

    virtual HRESULT STDMETHODCALLTYPE Find(
        ITextRange2 *range,
        LONG count,
        LONG flags,
        LONG *delta) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetChar2(
        LONG *ch,
        LONG offset) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDropCap(
        LONG *line,
        LONG *pos) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetInlineObject(
        LONG *type,
        LONG *align,
        LONG *ch,
        LONG *ch1,
        LONG *ch2,
        LONG *count,
        LONG *texstyle,
        LONG *ccol,
        LONG *level) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetProperty(
        LONG type,
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRect(
        LONG type,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom,
        LONG *hit) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSubrange(
        LONG subrange,
        LONG *first,
        LONG *limit) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetText2(
        LONG flags,
        BSTR *str) = 0;

    virtual HRESULT STDMETHODCALLTYPE HexToUnicode(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE InsertTable(
        LONG col,
        LONG row,
        LONG autofit) = 0;

    virtual HRESULT STDMETHODCALLTYPE Linearize(
        LONG flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetActiveSubrange(
        LONG anchor,
        LONG active) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDropCap(
        LONG line,
        LONG pos) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetProperty(
        LONG type,
        LONG value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetText2(
        LONG flags,
        BSTR str) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnicodeToHex(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetInlineObject(
        LONG type,
        LONG align,
        LONG ch,
        LONG ch1,
        LONG ch2,
        LONG count,
        LONG texstyle,
        LONG ccol) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetMathFunctionType(
        BSTR str,
        LONG *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE InsertImage(
        LONG width,
        LONG height,
        LONG ascent,
        LONG type,
        BSTR alttext,
        IStream *stream) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextRange2, 0xc241f5e2, 0x7206, 0x11d8, 0xa2,0xc7, 0x00,0xa0,0xd1,0xd6,0xc6,0xb3)
#endif
#else
typedef struct ITextRange2Vtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextRange2 *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextRange2 *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextRange2 *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextRange2 *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextRange2 *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextRange2 *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextRange2 *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextRange methods ***/
    HRESULT (STDMETHODCALLTYPE *GetText)(
        ITextRange2 *This,
        BSTR *pbstr);

    HRESULT (STDMETHODCALLTYPE *SetText)(
        ITextRange2 *This,
        BSTR bstr);

    HRESULT (STDMETHODCALLTYPE *GetChar)(
        ITextRange2 *This,
        LONG *pch);

    HRESULT (STDMETHODCALLTYPE *SetChar)(
        ITextRange2 *This,
        LONG ch);

    HRESULT (STDMETHODCALLTYPE *GetDuplicate)(
        ITextRange2 *This,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *GetFormattedText)(
        ITextRange2 *This,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *SetFormattedText)(
        ITextRange2 *This,
        ITextRange *pRange);

    HRESULT (STDMETHODCALLTYPE *GetStart)(
        ITextRange2 *This,
        LONG *pcpFirst);

    HRESULT (STDMETHODCALLTYPE *SetStart)(
        ITextRange2 *This,
        LONG cpFirst);

    HRESULT (STDMETHODCALLTYPE *GetEnd)(
        ITextRange2 *This,
        LONG *pcpLim);

    HRESULT (STDMETHODCALLTYPE *SetEnd)(
        ITextRange2 *This,
        LONG cpLim);

    HRESULT (STDMETHODCALLTYPE *GetFont)(
        ITextRange2 *This,
        ITextFont **pFont);

    HRESULT (STDMETHODCALLTYPE *SetFont)(
        ITextRange2 *This,
        ITextFont *pFont);

    HRESULT (STDMETHODCALLTYPE *GetPara)(
        ITextRange2 *This,
        ITextPara **ppPara);

    HRESULT (STDMETHODCALLTYPE *SetPara)(
        ITextRange2 *This,
        ITextPara *pPara);

    HRESULT (STDMETHODCALLTYPE *GetStoryLength)(
        ITextRange2 *This,
        LONG *pcch);

    HRESULT (STDMETHODCALLTYPE *GetStoryType)(
        ITextRange2 *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *Collapse)(
        ITextRange2 *This,
        LONG bStart);

    HRESULT (STDMETHODCALLTYPE *Expand)(
        ITextRange2 *This,
        LONG Unit,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *GetIndex)(
        ITextRange2 *This,
        LONG Unit,
        LONG *pIndex);

    HRESULT (STDMETHODCALLTYPE *SetIndex)(
        ITextRange2 *This,
        LONG Unit,
        LONG Index,
        LONG Extend);

    HRESULT (STDMETHODCALLTYPE *SetRange)(
        ITextRange2 *This,
        LONG anchor,
        LONG active);

    HRESULT (STDMETHODCALLTYPE *InRange)(
        ITextRange2 *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *InStory)(
        ITextRange2 *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *IsEqual)(
        ITextRange2 *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *Select)(
        ITextRange2 *This);

    HRESULT (STDMETHODCALLTYPE *StartOf)(
        ITextRange2 *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *EndOf)(
        ITextRange2 *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *Move)(
        ITextRange2 *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStart)(
        ITextRange2 *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEnd)(
        ITextRange2 *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveWhile)(
        ITextRange2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStartWhile)(
        ITextRange2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEndWhile)(
        ITextRange2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveUntil)(
        ITextRange2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStartUntil)(
        ITextRange2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEndUntil)(
        ITextRange2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *FindText)(
        ITextRange2 *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *FindTextStart)(
        ITextRange2 *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *FindTextEnd)(
        ITextRange2 *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *Delete)(
        ITextRange2 *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *Cut)(
        ITextRange2 *This,
        VARIANT *pVar);

    HRESULT (STDMETHODCALLTYPE *Copy)(
        ITextRange2 *This,
        VARIANT *pVar);

    HRESULT (STDMETHODCALLTYPE *Paste)(
        ITextRange2 *This,
        VARIANT *pVar,
        LONG Format);

    HRESULT (STDMETHODCALLTYPE *CanPaste)(
        ITextRange2 *This,
        VARIANT *pVar,
        LONG Format,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *CanEdit)(
        ITextRange2 *This,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *ChangeCase)(
        ITextRange2 *This,
        LONG Type);

    HRESULT (STDMETHODCALLTYPE *GetPoint)(
        ITextRange2 *This,
        LONG Type,
        LONG *cx,
        LONG *cy);

    HRESULT (STDMETHODCALLTYPE *SetPoint)(
        ITextRange2 *This,
        LONG x,
        LONG y,
        LONG Type,
        LONG Extend);

    HRESULT (STDMETHODCALLTYPE *ScrollIntoView)(
        ITextRange2 *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetEmbeddedObject)(
        ITextRange2 *This,
        IUnknown **ppv);

    /*** ITextSelection methods ***/
    HRESULT (STDMETHODCALLTYPE *GetFlags)(
        ITextRange2 *This,
        LONG *pFlags);

    HRESULT (STDMETHODCALLTYPE *SetFlags)(
        ITextRange2 *This,
        LONG Flags);

    HRESULT (STDMETHODCALLTYPE *GetType)(
        ITextRange2 *This,
        LONG *pType);

    HRESULT (STDMETHODCALLTYPE *MoveLeft)(
        ITextRange2 *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveRight)(
        ITextRange2 *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveUp)(
        ITextRange2 *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveDown)(
        ITextRange2 *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *HomeKey)(
        ITextRange2 *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *EndKey)(
        ITextRange2 *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *TypeText)(
        ITextRange2 *This,
        BSTR bstr);

    /*** ITextRange2 methods ***/
    HRESULT (STDMETHODCALLTYPE *GetCch)(
        ITextRange2 *This,
        LONG *count);

    HRESULT (STDMETHODCALLTYPE *GetCells)(
        ITextRange2 *This,
        IUnknown **cells);

    HRESULT (STDMETHODCALLTYPE *GetColumn)(
        ITextRange2 *This,
        IUnknown **column);

    HRESULT (STDMETHODCALLTYPE *GetCount)(
        ITextRange2 *This,
        LONG *count);

    HRESULT (STDMETHODCALLTYPE *GetDuplicate2)(
        ITextRange2 *This,
        ITextRange2 **range);

    HRESULT (STDMETHODCALLTYPE *GetFont2)(
        ITextRange2 *This,
        ITextFont2 **font);

    HRESULT (STDMETHODCALLTYPE *SetFont2)(
        ITextRange2 *This,
        ITextFont2 *font);

    HRESULT (STDMETHODCALLTYPE *GetFormattedText2)(
        ITextRange2 *This,
        ITextRange2 **range);

    HRESULT (STDMETHODCALLTYPE *SetFormattedText2)(
        ITextRange2 *This,
        ITextRange2 *range);

    HRESULT (STDMETHODCALLTYPE *GetGravity)(
        ITextRange2 *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetGravity)(
        ITextRange2 *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetPara2)(
        ITextRange2 *This,
        ITextPara2 **para);

    HRESULT (STDMETHODCALLTYPE *SetPara2)(
        ITextRange2 *This,
        ITextPara2 *para);

    HRESULT (STDMETHODCALLTYPE *GetRow)(
        ITextRange2 *This,
        ITextRow **row);

    HRESULT (STDMETHODCALLTYPE *GetStartPara)(
        ITextRange2 *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *GetTable)(
        ITextRange2 *This,
        IUnknown **table);

    HRESULT (STDMETHODCALLTYPE *GetURL)(
        ITextRange2 *This,
        BSTR *url);

    HRESULT (STDMETHODCALLTYPE *SetURL)(
        ITextRange2 *This,
        BSTR url);

    HRESULT (STDMETHODCALLTYPE *AddSubrange)(
        ITextRange2 *This,
        LONG cp1,
        LONG cp2,
        LONG activate);

    HRESULT (STDMETHODCALLTYPE *BuildUpMath)(
        ITextRange2 *This,
        LONG flags);

    HRESULT (STDMETHODCALLTYPE *DeleteSubrange)(
        ITextRange2 *This,
        LONG first,
        LONG lim);

    HRESULT (STDMETHODCALLTYPE *Find)(
        ITextRange2 *This,
        ITextRange2 *range,
        LONG count,
        LONG flags,
        LONG *delta);

    HRESULT (STDMETHODCALLTYPE *GetChar2)(
        ITextRange2 *This,
        LONG *ch,
        LONG offset);

    HRESULT (STDMETHODCALLTYPE *GetDropCap)(
        ITextRange2 *This,
        LONG *line,
        LONG *pos);

    HRESULT (STDMETHODCALLTYPE *GetInlineObject)(
        ITextRange2 *This,
        LONG *type,
        LONG *align,
        LONG *ch,
        LONG *ch1,
        LONG *ch2,
        LONG *count,
        LONG *texstyle,
        LONG *ccol,
        LONG *level);

    HRESULT (STDMETHODCALLTYPE *GetProperty)(
        ITextRange2 *This,
        LONG type,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *GetRect)(
        ITextRange2 *This,
        LONG type,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom,
        LONG *hit);

    HRESULT (STDMETHODCALLTYPE *GetSubrange)(
        ITextRange2 *This,
        LONG subrange,
        LONG *first,
        LONG *limit);

    HRESULT (STDMETHODCALLTYPE *GetText2)(
        ITextRange2 *This,
        LONG flags,
        BSTR *str);

    HRESULT (STDMETHODCALLTYPE *HexToUnicode)(
        ITextRange2 *This);

    HRESULT (STDMETHODCALLTYPE *InsertTable)(
        ITextRange2 *This,
        LONG col,
        LONG row,
        LONG autofit);

    HRESULT (STDMETHODCALLTYPE *Linearize)(
        ITextRange2 *This,
        LONG flags);

    HRESULT (STDMETHODCALLTYPE *SetActiveSubrange)(
        ITextRange2 *This,
        LONG anchor,
        LONG active);

    HRESULT (STDMETHODCALLTYPE *SetDropCap)(
        ITextRange2 *This,
        LONG line,
        LONG pos);

    HRESULT (STDMETHODCALLTYPE *SetProperty)(
        ITextRange2 *This,
        LONG type,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *SetText2)(
        ITextRange2 *This,
        LONG flags,
        BSTR str);

    HRESULT (STDMETHODCALLTYPE *UnicodeToHex)(
        ITextRange2 *This);

    HRESULT (STDMETHODCALLTYPE *SetInlineObject)(
        ITextRange2 *This,
        LONG type,
        LONG align,
        LONG ch,
        LONG ch1,
        LONG ch2,
        LONG count,
        LONG texstyle,
        LONG ccol);

    HRESULT (STDMETHODCALLTYPE *GetMathFunctionType)(
        ITextRange2 *This,
        BSTR str,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *InsertImage)(
        ITextRange2 *This,
        LONG width,
        LONG height,
        LONG ascent,
        LONG type,
        BSTR alttext,
        IStream *stream);

    END_INTERFACE
} ITextRange2Vtbl;

interface ITextRange2 {
    CONST_VTBL ITextRange2Vtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextRange2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextRange2_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextRange2_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextRange2_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextRange2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextRange2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextRange2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextRange methods ***/
#define ITextRange2_GetText(This,pbstr) (This)->lpVtbl->GetText(This,pbstr)
#define ITextRange2_SetText(This,bstr) (This)->lpVtbl->SetText(This,bstr)
#define ITextRange2_GetChar(This,pch) (This)->lpVtbl->GetChar(This,pch)
#define ITextRange2_SetChar(This,ch) (This)->lpVtbl->SetChar(This,ch)
#define ITextRange2_GetDuplicate(This,ppRange) (This)->lpVtbl->GetDuplicate(This,ppRange)
#define ITextRange2_GetFormattedText(This,ppRange) (This)->lpVtbl->GetFormattedText(This,ppRange)
#define ITextRange2_SetFormattedText(This,pRange) (This)->lpVtbl->SetFormattedText(This,pRange)
#define ITextRange2_GetStart(This,pcpFirst) (This)->lpVtbl->GetStart(This,pcpFirst)
#define ITextRange2_SetStart(This,cpFirst) (This)->lpVtbl->SetStart(This,cpFirst)
#define ITextRange2_GetEnd(This,pcpLim) (This)->lpVtbl->GetEnd(This,pcpLim)
#define ITextRange2_SetEnd(This,cpLim) (This)->lpVtbl->SetEnd(This,cpLim)
#define ITextRange2_GetFont(This,pFont) (This)->lpVtbl->GetFont(This,pFont)
#define ITextRange2_SetFont(This,pFont) (This)->lpVtbl->SetFont(This,pFont)
#define ITextRange2_GetPara(This,ppPara) (This)->lpVtbl->GetPara(This,ppPara)
#define ITextRange2_SetPara(This,pPara) (This)->lpVtbl->SetPara(This,pPara)
#define ITextRange2_GetStoryLength(This,pcch) (This)->lpVtbl->GetStoryLength(This,pcch)
#define ITextRange2_GetStoryType(This,pValue) (This)->lpVtbl->GetStoryType(This,pValue)
#define ITextRange2_Collapse(This,bStart) (This)->lpVtbl->Collapse(This,bStart)
#define ITextRange2_Expand(This,Unit,pDelta) (This)->lpVtbl->Expand(This,Unit,pDelta)
#define ITextRange2_GetIndex(This,Unit,pIndex) (This)->lpVtbl->GetIndex(This,Unit,pIndex)
#define ITextRange2_SetIndex(This,Unit,Index,Extend) (This)->lpVtbl->SetIndex(This,Unit,Index,Extend)
#define ITextRange2_SetRange(This,anchor,active) (This)->lpVtbl->SetRange(This,anchor,active)
#define ITextRange2_InRange(This,pRange,pb) (This)->lpVtbl->InRange(This,pRange,pb)
#define ITextRange2_InStory(This,pRange,pb) (This)->lpVtbl->InStory(This,pRange,pb)
#define ITextRange2_IsEqual(This,pRange,pb) (This)->lpVtbl->IsEqual(This,pRange,pb)
#define ITextRange2_Select(This) (This)->lpVtbl->Select(This)
#define ITextRange2_StartOf(This,Unit,Extend,pDelta) (This)->lpVtbl->StartOf(This,Unit,Extend,pDelta)
#define ITextRange2_EndOf(This,Unit,Extend,pDelta) (This)->lpVtbl->EndOf(This,Unit,Extend,pDelta)
#define ITextRange2_Move(This,Unit,Count,pDelta) (This)->lpVtbl->Move(This,Unit,Count,pDelta)
#define ITextRange2_MoveStart(This,Unit,Count,pDelta) (This)->lpVtbl->MoveStart(This,Unit,Count,pDelta)
#define ITextRange2_MoveEnd(This,Unit,Count,pDelta) (This)->lpVtbl->MoveEnd(This,Unit,Count,pDelta)
#define ITextRange2_MoveWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveWhile(This,Cset,Count,pDelta)
#define ITextRange2_MoveStartWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveStartWhile(This,Cset,Count,pDelta)
#define ITextRange2_MoveEndWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveEndWhile(This,Cset,Count,pDelta)
#define ITextRange2_MoveUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveUntil(This,Cset,Count,pDelta)
#define ITextRange2_MoveStartUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveStartUntil(This,Cset,Count,pDelta)
#define ITextRange2_MoveEndUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveEndUntil(This,Cset,Count,pDelta)
#define ITextRange2_FindText(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindText(This,bstr,cch,Flags,pLength)
#define ITextRange2_FindTextStart(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindTextStart(This,bstr,cch,Flags,pLength)
#define ITextRange2_FindTextEnd(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindTextEnd(This,bstr,cch,Flags,pLength)
#define ITextRange2_Delete(This,Unit,Count,pDelta) (This)->lpVtbl->Delete(This,Unit,Count,pDelta)
#define ITextRange2_Cut(This,pVar) (This)->lpVtbl->Cut(This,pVar)
#define ITextRange2_Copy(This,pVar) (This)->lpVtbl->Copy(This,pVar)
#define ITextRange2_Paste(This,pVar,Format) (This)->lpVtbl->Paste(This,pVar,Format)
#define ITextRange2_CanPaste(This,pVar,Format,pb) (This)->lpVtbl->CanPaste(This,pVar,Format,pb)
#define ITextRange2_CanEdit(This,pb) (This)->lpVtbl->CanEdit(This,pb)
#define ITextRange2_ChangeCase(This,Type) (This)->lpVtbl->ChangeCase(This,Type)
#define ITextRange2_GetPoint(This,Type,cx,cy) (This)->lpVtbl->GetPoint(This,Type,cx,cy)
#define ITextRange2_SetPoint(This,x,y,Type,Extend) (This)->lpVtbl->SetPoint(This,x,y,Type,Extend)
#define ITextRange2_ScrollIntoView(This,Value) (This)->lpVtbl->ScrollIntoView(This,Value)
#define ITextRange2_GetEmbeddedObject(This,ppv) (This)->lpVtbl->GetEmbeddedObject(This,ppv)
/*** ITextSelection methods ***/
#define ITextRange2_GetFlags(This,pFlags) (This)->lpVtbl->GetFlags(This,pFlags)
#define ITextRange2_SetFlags(This,Flags) (This)->lpVtbl->SetFlags(This,Flags)
#define ITextRange2_GetType(This,pType) (This)->lpVtbl->GetType(This,pType)
#define ITextRange2_MoveLeft(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveLeft(This,Unit,Count,Extend,pDelta)
#define ITextRange2_MoveRight(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveRight(This,Unit,Count,Extend,pDelta)
#define ITextRange2_MoveUp(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveUp(This,Unit,Count,Extend,pDelta)
#define ITextRange2_MoveDown(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveDown(This,Unit,Count,Extend,pDelta)
#define ITextRange2_HomeKey(This,Unit,Extend,pDelta) (This)->lpVtbl->HomeKey(This,Unit,Extend,pDelta)
#define ITextRange2_EndKey(This,Unit,Extend,pDelta) (This)->lpVtbl->EndKey(This,Unit,Extend,pDelta)
#define ITextRange2_TypeText(This,bstr) (This)->lpVtbl->TypeText(This,bstr)
/*** ITextRange2 methods ***/
#define ITextRange2_GetCch(This,count) (This)->lpVtbl->GetCch(This,count)
#define ITextRange2_GetCells(This,cells) (This)->lpVtbl->GetCells(This,cells)
#define ITextRange2_GetColumn(This,column) (This)->lpVtbl->GetColumn(This,column)
#define ITextRange2_GetCount(This,count) (This)->lpVtbl->GetCount(This,count)
#define ITextRange2_GetDuplicate2(This,range) (This)->lpVtbl->GetDuplicate2(This,range)
#define ITextRange2_GetFont2(This,font) (This)->lpVtbl->GetFont2(This,font)
#define ITextRange2_SetFont2(This,font) (This)->lpVtbl->SetFont2(This,font)
#define ITextRange2_GetFormattedText2(This,range) (This)->lpVtbl->GetFormattedText2(This,range)
#define ITextRange2_SetFormattedText2(This,range) (This)->lpVtbl->SetFormattedText2(This,range)
#define ITextRange2_GetGravity(This,value) (This)->lpVtbl->GetGravity(This,value)
#define ITextRange2_SetGravity(This,value) (This)->lpVtbl->SetGravity(This,value)
#define ITextRange2_GetPara2(This,para) (This)->lpVtbl->GetPara2(This,para)
#define ITextRange2_SetPara2(This,para) (This)->lpVtbl->SetPara2(This,para)
#define ITextRange2_GetRow(This,row) (This)->lpVtbl->GetRow(This,row)
#define ITextRange2_GetStartPara(This,value) (This)->lpVtbl->GetStartPara(This,value)
#define ITextRange2_GetTable(This,table) (This)->lpVtbl->GetTable(This,table)
#define ITextRange2_GetURL(This,url) (This)->lpVtbl->GetURL(This,url)
#define ITextRange2_SetURL(This,url) (This)->lpVtbl->SetURL(This,url)
#define ITextRange2_AddSubrange(This,cp1,cp2,activate) (This)->lpVtbl->AddSubrange(This,cp1,cp2,activate)
#define ITextRange2_BuildUpMath(This,flags) (This)->lpVtbl->BuildUpMath(This,flags)
#define ITextRange2_DeleteSubrange(This,first,lim) (This)->lpVtbl->DeleteSubrange(This,first,lim)
#define ITextRange2_Find(This,range,count,flags,delta) (This)->lpVtbl->Find(This,range,count,flags,delta)
#define ITextRange2_GetChar2(This,ch,offset) (This)->lpVtbl->GetChar2(This,ch,offset)
#define ITextRange2_GetDropCap(This,line,pos) (This)->lpVtbl->GetDropCap(This,line,pos)
#define ITextRange2_GetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol,level) (This)->lpVtbl->GetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol,level)
#define ITextRange2_GetProperty(This,type,value) (This)->lpVtbl->GetProperty(This,type,value)
#define ITextRange2_GetRect(This,type,left,top,right,bottom,hit) (This)->lpVtbl->GetRect(This,type,left,top,right,bottom,hit)
#define ITextRange2_GetSubrange(This,subrange,first,limit) (This)->lpVtbl->GetSubrange(This,subrange,first,limit)
#define ITextRange2_GetText2(This,flags,str) (This)->lpVtbl->GetText2(This,flags,str)
#define ITextRange2_HexToUnicode(This) (This)->lpVtbl->HexToUnicode(This)
#define ITextRange2_InsertTable(This,col,row,autofit) (This)->lpVtbl->InsertTable(This,col,row,autofit)
#define ITextRange2_Linearize(This,flags) (This)->lpVtbl->Linearize(This,flags)
#define ITextRange2_SetActiveSubrange(This,anchor,active) (This)->lpVtbl->SetActiveSubrange(This,anchor,active)
#define ITextRange2_SetDropCap(This,line,pos) (This)->lpVtbl->SetDropCap(This,line,pos)
#define ITextRange2_SetProperty(This,type,value) (This)->lpVtbl->SetProperty(This,type,value)
#define ITextRange2_SetText2(This,flags,str) (This)->lpVtbl->SetText2(This,flags,str)
#define ITextRange2_UnicodeToHex(This) (This)->lpVtbl->UnicodeToHex(This)
#define ITextRange2_SetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol) (This)->lpVtbl->SetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol)
#define ITextRange2_GetMathFunctionType(This,str,value) (This)->lpVtbl->GetMathFunctionType(This,str,value)
#define ITextRange2_InsertImage(This,width,height,ascent,type,alttext,stream) (This)->lpVtbl->InsertImage(This,width,height,ascent,type,alttext,stream)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextRange2_QueryInterface(ITextRange2* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextRange2_AddRef(ITextRange2* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextRange2_Release(ITextRange2* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextRange2_GetTypeInfoCount(ITextRange2* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextRange2_GetTypeInfo(ITextRange2* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextRange2_GetIDsOfNames(ITextRange2* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextRange2_Invoke(ITextRange2* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextRange methods ***/
static inline HRESULT ITextRange2_GetText(ITextRange2* This,BSTR *pbstr) {
    return This->lpVtbl->GetText(This,pbstr);
}
static inline HRESULT ITextRange2_SetText(ITextRange2* This,BSTR bstr) {
    return This->lpVtbl->SetText(This,bstr);
}
static inline HRESULT ITextRange2_GetChar(ITextRange2* This,LONG *pch) {
    return This->lpVtbl->GetChar(This,pch);
}
static inline HRESULT ITextRange2_SetChar(ITextRange2* This,LONG ch) {
    return This->lpVtbl->SetChar(This,ch);
}
static inline HRESULT ITextRange2_GetDuplicate(ITextRange2* This,ITextRange **ppRange) {
    return This->lpVtbl->GetDuplicate(This,ppRange);
}
static inline HRESULT ITextRange2_GetFormattedText(ITextRange2* This,ITextRange **ppRange) {
    return This->lpVtbl->GetFormattedText(This,ppRange);
}
static inline HRESULT ITextRange2_SetFormattedText(ITextRange2* This,ITextRange *pRange) {
    return This->lpVtbl->SetFormattedText(This,pRange);
}
static inline HRESULT ITextRange2_GetStart(ITextRange2* This,LONG *pcpFirst) {
    return This->lpVtbl->GetStart(This,pcpFirst);
}
static inline HRESULT ITextRange2_SetStart(ITextRange2* This,LONG cpFirst) {
    return This->lpVtbl->SetStart(This,cpFirst);
}
static inline HRESULT ITextRange2_GetEnd(ITextRange2* This,LONG *pcpLim) {
    return This->lpVtbl->GetEnd(This,pcpLim);
}
static inline HRESULT ITextRange2_SetEnd(ITextRange2* This,LONG cpLim) {
    return This->lpVtbl->SetEnd(This,cpLim);
}
static inline HRESULT ITextRange2_GetFont(ITextRange2* This,ITextFont **pFont) {
    return This->lpVtbl->GetFont(This,pFont);
}
static inline HRESULT ITextRange2_SetFont(ITextRange2* This,ITextFont *pFont) {
    return This->lpVtbl->SetFont(This,pFont);
}
static inline HRESULT ITextRange2_GetPara(ITextRange2* This,ITextPara **ppPara) {
    return This->lpVtbl->GetPara(This,ppPara);
}
static inline HRESULT ITextRange2_SetPara(ITextRange2* This,ITextPara *pPara) {
    return This->lpVtbl->SetPara(This,pPara);
}
static inline HRESULT ITextRange2_GetStoryLength(ITextRange2* This,LONG *pcch) {
    return This->lpVtbl->GetStoryLength(This,pcch);
}
static inline HRESULT ITextRange2_GetStoryType(ITextRange2* This,LONG *pValue) {
    return This->lpVtbl->GetStoryType(This,pValue);
}
static inline HRESULT ITextRange2_Collapse(ITextRange2* This,LONG bStart) {
    return This->lpVtbl->Collapse(This,bStart);
}
static inline HRESULT ITextRange2_Expand(ITextRange2* This,LONG Unit,LONG *pDelta) {
    return This->lpVtbl->Expand(This,Unit,pDelta);
}
static inline HRESULT ITextRange2_GetIndex(ITextRange2* This,LONG Unit,LONG *pIndex) {
    return This->lpVtbl->GetIndex(This,Unit,pIndex);
}
static inline HRESULT ITextRange2_SetIndex(ITextRange2* This,LONG Unit,LONG Index,LONG Extend) {
    return This->lpVtbl->SetIndex(This,Unit,Index,Extend);
}
static inline HRESULT ITextRange2_SetRange(ITextRange2* This,LONG anchor,LONG active) {
    return This->lpVtbl->SetRange(This,anchor,active);
}
static inline HRESULT ITextRange2_InRange(ITextRange2* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->InRange(This,pRange,pb);
}
static inline HRESULT ITextRange2_InStory(ITextRange2* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->InStory(This,pRange,pb);
}
static inline HRESULT ITextRange2_IsEqual(ITextRange2* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->IsEqual(This,pRange,pb);
}
static inline HRESULT ITextRange2_Select(ITextRange2* This) {
    return This->lpVtbl->Select(This);
}
static inline HRESULT ITextRange2_StartOf(ITextRange2* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->StartOf(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextRange2_EndOf(ITextRange2* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->EndOf(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextRange2_Move(ITextRange2* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->Move(This,Unit,Count,pDelta);
}
static inline HRESULT ITextRange2_MoveStart(ITextRange2* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStart(This,Unit,Count,pDelta);
}
static inline HRESULT ITextRange2_MoveEnd(ITextRange2* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEnd(This,Unit,Count,pDelta);
}
static inline HRESULT ITextRange2_MoveWhile(ITextRange2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange2_MoveStartWhile(ITextRange2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStartWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange2_MoveEndWhile(ITextRange2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEndWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange2_MoveUntil(ITextRange2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange2_MoveStartUntil(ITextRange2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStartUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange2_MoveEndUntil(ITextRange2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEndUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextRange2_FindText(ITextRange2* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindText(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextRange2_FindTextStart(ITextRange2* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindTextStart(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextRange2_FindTextEnd(ITextRange2* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindTextEnd(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextRange2_Delete(ITextRange2* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->Delete(This,Unit,Count,pDelta);
}
static inline HRESULT ITextRange2_Cut(ITextRange2* This,VARIANT *pVar) {
    return This->lpVtbl->Cut(This,pVar);
}
static inline HRESULT ITextRange2_Copy(ITextRange2* This,VARIANT *pVar) {
    return This->lpVtbl->Copy(This,pVar);
}
static inline HRESULT ITextRange2_Paste(ITextRange2* This,VARIANT *pVar,LONG Format) {
    return This->lpVtbl->Paste(This,pVar,Format);
}
static inline HRESULT ITextRange2_CanPaste(ITextRange2* This,VARIANT *pVar,LONG Format,LONG *pb) {
    return This->lpVtbl->CanPaste(This,pVar,Format,pb);
}
static inline HRESULT ITextRange2_CanEdit(ITextRange2* This,LONG *pb) {
    return This->lpVtbl->CanEdit(This,pb);
}
static inline HRESULT ITextRange2_ChangeCase(ITextRange2* This,LONG Type) {
    return This->lpVtbl->ChangeCase(This,Type);
}
static inline HRESULT ITextRange2_GetPoint(ITextRange2* This,LONG Type,LONG *cx,LONG *cy) {
    return This->lpVtbl->GetPoint(This,Type,cx,cy);
}
static inline HRESULT ITextRange2_SetPoint(ITextRange2* This,LONG x,LONG y,LONG Type,LONG Extend) {
    return This->lpVtbl->SetPoint(This,x,y,Type,Extend);
}
static inline HRESULT ITextRange2_ScrollIntoView(ITextRange2* This,LONG Value) {
    return This->lpVtbl->ScrollIntoView(This,Value);
}
static inline HRESULT ITextRange2_GetEmbeddedObject(ITextRange2* This,IUnknown **ppv) {
    return This->lpVtbl->GetEmbeddedObject(This,ppv);
}
/*** ITextSelection methods ***/
static inline HRESULT ITextRange2_GetFlags(ITextRange2* This,LONG *pFlags) {
    return This->lpVtbl->GetFlags(This,pFlags);
}
static inline HRESULT ITextRange2_SetFlags(ITextRange2* This,LONG Flags) {
    return This->lpVtbl->SetFlags(This,Flags);
}
static inline HRESULT ITextRange2_GetType(ITextRange2* This,LONG *pType) {
    return This->lpVtbl->GetType(This,pType);
}
static inline HRESULT ITextRange2_MoveLeft(ITextRange2* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveLeft(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextRange2_MoveRight(ITextRange2* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveRight(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextRange2_MoveUp(ITextRange2* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveUp(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextRange2_MoveDown(ITextRange2* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveDown(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextRange2_HomeKey(ITextRange2* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->HomeKey(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextRange2_EndKey(ITextRange2* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->EndKey(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextRange2_TypeText(ITextRange2* This,BSTR bstr) {
    return This->lpVtbl->TypeText(This,bstr);
}
/*** ITextRange2 methods ***/
static inline HRESULT ITextRange2_GetCch(ITextRange2* This,LONG *count) {
    return This->lpVtbl->GetCch(This,count);
}
static inline HRESULT ITextRange2_GetCells(ITextRange2* This,IUnknown **cells) {
    return This->lpVtbl->GetCells(This,cells);
}
static inline HRESULT ITextRange2_GetColumn(ITextRange2* This,IUnknown **column) {
    return This->lpVtbl->GetColumn(This,column);
}
static inline HRESULT ITextRange2_GetCount(ITextRange2* This,LONG *count) {
    return This->lpVtbl->GetCount(This,count);
}
static inline HRESULT ITextRange2_GetDuplicate2(ITextRange2* This,ITextRange2 **range) {
    return This->lpVtbl->GetDuplicate2(This,range);
}
static inline HRESULT ITextRange2_GetFont2(ITextRange2* This,ITextFont2 **font) {
    return This->lpVtbl->GetFont2(This,font);
}
static inline HRESULT ITextRange2_SetFont2(ITextRange2* This,ITextFont2 *font) {
    return This->lpVtbl->SetFont2(This,font);
}
static inline HRESULT ITextRange2_GetFormattedText2(ITextRange2* This,ITextRange2 **range) {
    return This->lpVtbl->GetFormattedText2(This,range);
}
static inline HRESULT ITextRange2_SetFormattedText2(ITextRange2* This,ITextRange2 *range) {
    return This->lpVtbl->SetFormattedText2(This,range);
}
static inline HRESULT ITextRange2_GetGravity(ITextRange2* This,LONG *value) {
    return This->lpVtbl->GetGravity(This,value);
}
static inline HRESULT ITextRange2_SetGravity(ITextRange2* This,LONG value) {
    return This->lpVtbl->SetGravity(This,value);
}
static inline HRESULT ITextRange2_GetPara2(ITextRange2* This,ITextPara2 **para) {
    return This->lpVtbl->GetPara2(This,para);
}
static inline HRESULT ITextRange2_SetPara2(ITextRange2* This,ITextPara2 *para) {
    return This->lpVtbl->SetPara2(This,para);
}
static inline HRESULT ITextRange2_GetRow(ITextRange2* This,ITextRow **row) {
    return This->lpVtbl->GetRow(This,row);
}
static inline HRESULT ITextRange2_GetStartPara(ITextRange2* This,LONG *value) {
    return This->lpVtbl->GetStartPara(This,value);
}
static inline HRESULT ITextRange2_GetTable(ITextRange2* This,IUnknown **table) {
    return This->lpVtbl->GetTable(This,table);
}
static inline HRESULT ITextRange2_GetURL(ITextRange2* This,BSTR *url) {
    return This->lpVtbl->GetURL(This,url);
}
static inline HRESULT ITextRange2_SetURL(ITextRange2* This,BSTR url) {
    return This->lpVtbl->SetURL(This,url);
}
static inline HRESULT ITextRange2_AddSubrange(ITextRange2* This,LONG cp1,LONG cp2,LONG activate) {
    return This->lpVtbl->AddSubrange(This,cp1,cp2,activate);
}
static inline HRESULT ITextRange2_BuildUpMath(ITextRange2* This,LONG flags) {
    return This->lpVtbl->BuildUpMath(This,flags);
}
static inline HRESULT ITextRange2_DeleteSubrange(ITextRange2* This,LONG first,LONG lim) {
    return This->lpVtbl->DeleteSubrange(This,first,lim);
}
static inline HRESULT ITextRange2_Find(ITextRange2* This,ITextRange2 *range,LONG count,LONG flags,LONG *delta) {
    return This->lpVtbl->Find(This,range,count,flags,delta);
}
static inline HRESULT ITextRange2_GetChar2(ITextRange2* This,LONG *ch,LONG offset) {
    return This->lpVtbl->GetChar2(This,ch,offset);
}
static inline HRESULT ITextRange2_GetDropCap(ITextRange2* This,LONG *line,LONG *pos) {
    return This->lpVtbl->GetDropCap(This,line,pos);
}
static inline HRESULT ITextRange2_GetInlineObject(ITextRange2* This,LONG *type,LONG *align,LONG *ch,LONG *ch1,LONG *ch2,LONG *count,LONG *texstyle,LONG *ccol,LONG *level) {
    return This->lpVtbl->GetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol,level);
}
static inline HRESULT ITextRange2_GetProperty(ITextRange2* This,LONG type,LONG *value) {
    return This->lpVtbl->GetProperty(This,type,value);
}
static inline HRESULT ITextRange2_GetRect(ITextRange2* This,LONG type,LONG *left,LONG *top,LONG *right,LONG *bottom,LONG *hit) {
    return This->lpVtbl->GetRect(This,type,left,top,right,bottom,hit);
}
static inline HRESULT ITextRange2_GetSubrange(ITextRange2* This,LONG subrange,LONG *first,LONG *limit) {
    return This->lpVtbl->GetSubrange(This,subrange,first,limit);
}
static inline HRESULT ITextRange2_GetText2(ITextRange2* This,LONG flags,BSTR *str) {
    return This->lpVtbl->GetText2(This,flags,str);
}
static inline HRESULT ITextRange2_HexToUnicode(ITextRange2* This) {
    return This->lpVtbl->HexToUnicode(This);
}
static inline HRESULT ITextRange2_InsertTable(ITextRange2* This,LONG col,LONG row,LONG autofit) {
    return This->lpVtbl->InsertTable(This,col,row,autofit);
}
static inline HRESULT ITextRange2_Linearize(ITextRange2* This,LONG flags) {
    return This->lpVtbl->Linearize(This,flags);
}
static inline HRESULT ITextRange2_SetActiveSubrange(ITextRange2* This,LONG anchor,LONG active) {
    return This->lpVtbl->SetActiveSubrange(This,anchor,active);
}
static inline HRESULT ITextRange2_SetDropCap(ITextRange2* This,LONG line,LONG pos) {
    return This->lpVtbl->SetDropCap(This,line,pos);
}
static inline HRESULT ITextRange2_SetProperty(ITextRange2* This,LONG type,LONG value) {
    return This->lpVtbl->SetProperty(This,type,value);
}
static inline HRESULT ITextRange2_SetText2(ITextRange2* This,LONG flags,BSTR str) {
    return This->lpVtbl->SetText2(This,flags,str);
}
static inline HRESULT ITextRange2_UnicodeToHex(ITextRange2* This) {
    return This->lpVtbl->UnicodeToHex(This);
}
static inline HRESULT ITextRange2_SetInlineObject(ITextRange2* This,LONG type,LONG align,LONG ch,LONG ch1,LONG ch2,LONG count,LONG texstyle,LONG ccol) {
    return This->lpVtbl->SetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol);
}
static inline HRESULT ITextRange2_GetMathFunctionType(ITextRange2* This,BSTR str,LONG *value) {
    return This->lpVtbl->GetMathFunctionType(This,str,value);
}
static inline HRESULT ITextRange2_InsertImage(ITextRange2* This,LONG width,LONG height,LONG ascent,LONG type,BSTR alttext,IStream *stream) {
    return This->lpVtbl->InsertImage(This,width,height,ascent,type,alttext,stream);
}
#endif
#endif

#endif


#endif  /* __ITextRange2_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITextSelection2 interface
 */
#ifndef __ITextSelection2_INTERFACE_DEFINED__
#define __ITextSelection2_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextSelection2, 0xc241f5e1, 0x7206, 0x11d8, 0xa2,0xc7, 0x00,0xa0,0xd1,0xd6,0xc6,0xb3);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("c241f5e1-7206-11d8-a2c7-00a0d1d6c6b3")
ITextSelection2 : public ITextRange2
{
};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextSelection2, 0xc241f5e1, 0x7206, 0x11d8, 0xa2,0xc7, 0x00,0xa0,0xd1,0xd6,0xc6,0xb3)
#endif
#else
typedef struct ITextSelection2Vtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextSelection2 *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextSelection2 *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextSelection2 *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextSelection2 *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextSelection2 *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextSelection2 *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextSelection2 *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextRange methods ***/
    HRESULT (STDMETHODCALLTYPE *GetText)(
        ITextSelection2 *This,
        BSTR *pbstr);

    HRESULT (STDMETHODCALLTYPE *SetText)(
        ITextSelection2 *This,
        BSTR bstr);

    HRESULT (STDMETHODCALLTYPE *GetChar)(
        ITextSelection2 *This,
        LONG *pch);

    HRESULT (STDMETHODCALLTYPE *SetChar)(
        ITextSelection2 *This,
        LONG ch);

    HRESULT (STDMETHODCALLTYPE *GetDuplicate)(
        ITextSelection2 *This,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *GetFormattedText)(
        ITextSelection2 *This,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *SetFormattedText)(
        ITextSelection2 *This,
        ITextRange *pRange);

    HRESULT (STDMETHODCALLTYPE *GetStart)(
        ITextSelection2 *This,
        LONG *pcpFirst);

    HRESULT (STDMETHODCALLTYPE *SetStart)(
        ITextSelection2 *This,
        LONG cpFirst);

    HRESULT (STDMETHODCALLTYPE *GetEnd)(
        ITextSelection2 *This,
        LONG *pcpLim);

    HRESULT (STDMETHODCALLTYPE *SetEnd)(
        ITextSelection2 *This,
        LONG cpLim);

    HRESULT (STDMETHODCALLTYPE *GetFont)(
        ITextSelection2 *This,
        ITextFont **pFont);

    HRESULT (STDMETHODCALLTYPE *SetFont)(
        ITextSelection2 *This,
        ITextFont *pFont);

    HRESULT (STDMETHODCALLTYPE *GetPara)(
        ITextSelection2 *This,
        ITextPara **ppPara);

    HRESULT (STDMETHODCALLTYPE *SetPara)(
        ITextSelection2 *This,
        ITextPara *pPara);

    HRESULT (STDMETHODCALLTYPE *GetStoryLength)(
        ITextSelection2 *This,
        LONG *pcch);

    HRESULT (STDMETHODCALLTYPE *GetStoryType)(
        ITextSelection2 *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *Collapse)(
        ITextSelection2 *This,
        LONG bStart);

    HRESULT (STDMETHODCALLTYPE *Expand)(
        ITextSelection2 *This,
        LONG Unit,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *GetIndex)(
        ITextSelection2 *This,
        LONG Unit,
        LONG *pIndex);

    HRESULT (STDMETHODCALLTYPE *SetIndex)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Index,
        LONG Extend);

    HRESULT (STDMETHODCALLTYPE *SetRange)(
        ITextSelection2 *This,
        LONG anchor,
        LONG active);

    HRESULT (STDMETHODCALLTYPE *InRange)(
        ITextSelection2 *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *InStory)(
        ITextSelection2 *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *IsEqual)(
        ITextSelection2 *This,
        ITextRange *pRange,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *Select)(
        ITextSelection2 *This);

    HRESULT (STDMETHODCALLTYPE *StartOf)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *EndOf)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *Move)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStart)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEnd)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveWhile)(
        ITextSelection2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStartWhile)(
        ITextSelection2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEndWhile)(
        ITextSelection2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveUntil)(
        ITextSelection2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveStartUntil)(
        ITextSelection2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveEndUntil)(
        ITextSelection2 *This,
        VARIANT *Cset,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *FindText)(
        ITextSelection2 *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *FindTextStart)(
        ITextSelection2 *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *FindTextEnd)(
        ITextSelection2 *This,
        BSTR bstr,
        LONG cch,
        LONG Flags,
        LONG *pLength);

    HRESULT (STDMETHODCALLTYPE *Delete)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Count,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *Cut)(
        ITextSelection2 *This,
        VARIANT *pVar);

    HRESULT (STDMETHODCALLTYPE *Copy)(
        ITextSelection2 *This,
        VARIANT *pVar);

    HRESULT (STDMETHODCALLTYPE *Paste)(
        ITextSelection2 *This,
        VARIANT *pVar,
        LONG Format);

    HRESULT (STDMETHODCALLTYPE *CanPaste)(
        ITextSelection2 *This,
        VARIANT *pVar,
        LONG Format,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *CanEdit)(
        ITextSelection2 *This,
        LONG *pb);

    HRESULT (STDMETHODCALLTYPE *ChangeCase)(
        ITextSelection2 *This,
        LONG Type);

    HRESULT (STDMETHODCALLTYPE *GetPoint)(
        ITextSelection2 *This,
        LONG Type,
        LONG *cx,
        LONG *cy);

    HRESULT (STDMETHODCALLTYPE *SetPoint)(
        ITextSelection2 *This,
        LONG x,
        LONG y,
        LONG Type,
        LONG Extend);

    HRESULT (STDMETHODCALLTYPE *ScrollIntoView)(
        ITextSelection2 *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetEmbeddedObject)(
        ITextSelection2 *This,
        IUnknown **ppv);

    /*** ITextSelection methods ***/
    HRESULT (STDMETHODCALLTYPE *GetFlags)(
        ITextSelection2 *This,
        LONG *pFlags);

    HRESULT (STDMETHODCALLTYPE *SetFlags)(
        ITextSelection2 *This,
        LONG Flags);

    HRESULT (STDMETHODCALLTYPE *GetType)(
        ITextSelection2 *This,
        LONG *pType);

    HRESULT (STDMETHODCALLTYPE *MoveLeft)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveRight)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveUp)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *MoveDown)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Count,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *HomeKey)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *EndKey)(
        ITextSelection2 *This,
        LONG Unit,
        LONG Extend,
        LONG *pDelta);

    HRESULT (STDMETHODCALLTYPE *TypeText)(
        ITextSelection2 *This,
        BSTR bstr);

    /*** ITextRange2 methods ***/
    HRESULT (STDMETHODCALLTYPE *GetCch)(
        ITextSelection2 *This,
        LONG *count);

    HRESULT (STDMETHODCALLTYPE *GetCells)(
        ITextSelection2 *This,
        IUnknown **cells);

    HRESULT (STDMETHODCALLTYPE *GetColumn)(
        ITextSelection2 *This,
        IUnknown **column);

    HRESULT (STDMETHODCALLTYPE *GetCount)(
        ITextSelection2 *This,
        LONG *count);

    HRESULT (STDMETHODCALLTYPE *GetDuplicate2)(
        ITextSelection2 *This,
        ITextRange2 **range);

    HRESULT (STDMETHODCALLTYPE *GetFont2)(
        ITextSelection2 *This,
        ITextFont2 **font);

    HRESULT (STDMETHODCALLTYPE *SetFont2)(
        ITextSelection2 *This,
        ITextFont2 *font);

    HRESULT (STDMETHODCALLTYPE *GetFormattedText2)(
        ITextSelection2 *This,
        ITextRange2 **range);

    HRESULT (STDMETHODCALLTYPE *SetFormattedText2)(
        ITextSelection2 *This,
        ITextRange2 *range);

    HRESULT (STDMETHODCALLTYPE *GetGravity)(
        ITextSelection2 *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *SetGravity)(
        ITextSelection2 *This,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *GetPara2)(
        ITextSelection2 *This,
        ITextPara2 **para);

    HRESULT (STDMETHODCALLTYPE *SetPara2)(
        ITextSelection2 *This,
        ITextPara2 *para);

    HRESULT (STDMETHODCALLTYPE *GetRow)(
        ITextSelection2 *This,
        ITextRow **row);

    HRESULT (STDMETHODCALLTYPE *GetStartPara)(
        ITextSelection2 *This,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *GetTable)(
        ITextSelection2 *This,
        IUnknown **table);

    HRESULT (STDMETHODCALLTYPE *GetURL)(
        ITextSelection2 *This,
        BSTR *url);

    HRESULT (STDMETHODCALLTYPE *SetURL)(
        ITextSelection2 *This,
        BSTR url);

    HRESULT (STDMETHODCALLTYPE *AddSubrange)(
        ITextSelection2 *This,
        LONG cp1,
        LONG cp2,
        LONG activate);

    HRESULT (STDMETHODCALLTYPE *BuildUpMath)(
        ITextSelection2 *This,
        LONG flags);

    HRESULT (STDMETHODCALLTYPE *DeleteSubrange)(
        ITextSelection2 *This,
        LONG first,
        LONG lim);

    HRESULT (STDMETHODCALLTYPE *Find)(
        ITextSelection2 *This,
        ITextRange2 *range,
        LONG count,
        LONG flags,
        LONG *delta);

    HRESULT (STDMETHODCALLTYPE *GetChar2)(
        ITextSelection2 *This,
        LONG *ch,
        LONG offset);

    HRESULT (STDMETHODCALLTYPE *GetDropCap)(
        ITextSelection2 *This,
        LONG *line,
        LONG *pos);

    HRESULT (STDMETHODCALLTYPE *GetInlineObject)(
        ITextSelection2 *This,
        LONG *type,
        LONG *align,
        LONG *ch,
        LONG *ch1,
        LONG *ch2,
        LONG *count,
        LONG *texstyle,
        LONG *ccol,
        LONG *level);

    HRESULT (STDMETHODCALLTYPE *GetProperty)(
        ITextSelection2 *This,
        LONG type,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *GetRect)(
        ITextSelection2 *This,
        LONG type,
        LONG *left,
        LONG *top,
        LONG *right,
        LONG *bottom,
        LONG *hit);

    HRESULT (STDMETHODCALLTYPE *GetSubrange)(
        ITextSelection2 *This,
        LONG subrange,
        LONG *first,
        LONG *limit);

    HRESULT (STDMETHODCALLTYPE *GetText2)(
        ITextSelection2 *This,
        LONG flags,
        BSTR *str);

    HRESULT (STDMETHODCALLTYPE *HexToUnicode)(
        ITextSelection2 *This);

    HRESULT (STDMETHODCALLTYPE *InsertTable)(
        ITextSelection2 *This,
        LONG col,
        LONG row,
        LONG autofit);

    HRESULT (STDMETHODCALLTYPE *Linearize)(
        ITextSelection2 *This,
        LONG flags);

    HRESULT (STDMETHODCALLTYPE *SetActiveSubrange)(
        ITextSelection2 *This,
        LONG anchor,
        LONG active);

    HRESULT (STDMETHODCALLTYPE *SetDropCap)(
        ITextSelection2 *This,
        LONG line,
        LONG pos);

    HRESULT (STDMETHODCALLTYPE *SetProperty)(
        ITextSelection2 *This,
        LONG type,
        LONG value);

    HRESULT (STDMETHODCALLTYPE *SetText2)(
        ITextSelection2 *This,
        LONG flags,
        BSTR str);

    HRESULT (STDMETHODCALLTYPE *UnicodeToHex)(
        ITextSelection2 *This);

    HRESULT (STDMETHODCALLTYPE *SetInlineObject)(
        ITextSelection2 *This,
        LONG type,
        LONG align,
        LONG ch,
        LONG ch1,
        LONG ch2,
        LONG count,
        LONG texstyle,
        LONG ccol);

    HRESULT (STDMETHODCALLTYPE *GetMathFunctionType)(
        ITextSelection2 *This,
        BSTR str,
        LONG *value);

    HRESULT (STDMETHODCALLTYPE *InsertImage)(
        ITextSelection2 *This,
        LONG width,
        LONG height,
        LONG ascent,
        LONG type,
        BSTR alttext,
        IStream *stream);

    END_INTERFACE
} ITextSelection2Vtbl;

interface ITextSelection2 {
    CONST_VTBL ITextSelection2Vtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextSelection2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextSelection2_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextSelection2_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextSelection2_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextSelection2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextSelection2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextSelection2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextRange methods ***/
#define ITextSelection2_GetText(This,pbstr) (This)->lpVtbl->GetText(This,pbstr)
#define ITextSelection2_SetText(This,bstr) (This)->lpVtbl->SetText(This,bstr)
#define ITextSelection2_GetChar(This,pch) (This)->lpVtbl->GetChar(This,pch)
#define ITextSelection2_SetChar(This,ch) (This)->lpVtbl->SetChar(This,ch)
#define ITextSelection2_GetDuplicate(This,ppRange) (This)->lpVtbl->GetDuplicate(This,ppRange)
#define ITextSelection2_GetFormattedText(This,ppRange) (This)->lpVtbl->GetFormattedText(This,ppRange)
#define ITextSelection2_SetFormattedText(This,pRange) (This)->lpVtbl->SetFormattedText(This,pRange)
#define ITextSelection2_GetStart(This,pcpFirst) (This)->lpVtbl->GetStart(This,pcpFirst)
#define ITextSelection2_SetStart(This,cpFirst) (This)->lpVtbl->SetStart(This,cpFirst)
#define ITextSelection2_GetEnd(This,pcpLim) (This)->lpVtbl->GetEnd(This,pcpLim)
#define ITextSelection2_SetEnd(This,cpLim) (This)->lpVtbl->SetEnd(This,cpLim)
#define ITextSelection2_GetFont(This,pFont) (This)->lpVtbl->GetFont(This,pFont)
#define ITextSelection2_SetFont(This,pFont) (This)->lpVtbl->SetFont(This,pFont)
#define ITextSelection2_GetPara(This,ppPara) (This)->lpVtbl->GetPara(This,ppPara)
#define ITextSelection2_SetPara(This,pPara) (This)->lpVtbl->SetPara(This,pPara)
#define ITextSelection2_GetStoryLength(This,pcch) (This)->lpVtbl->GetStoryLength(This,pcch)
#define ITextSelection2_GetStoryType(This,pValue) (This)->lpVtbl->GetStoryType(This,pValue)
#define ITextSelection2_Collapse(This,bStart) (This)->lpVtbl->Collapse(This,bStart)
#define ITextSelection2_Expand(This,Unit,pDelta) (This)->lpVtbl->Expand(This,Unit,pDelta)
#define ITextSelection2_GetIndex(This,Unit,pIndex) (This)->lpVtbl->GetIndex(This,Unit,pIndex)
#define ITextSelection2_SetIndex(This,Unit,Index,Extend) (This)->lpVtbl->SetIndex(This,Unit,Index,Extend)
#define ITextSelection2_SetRange(This,anchor,active) (This)->lpVtbl->SetRange(This,anchor,active)
#define ITextSelection2_InRange(This,pRange,pb) (This)->lpVtbl->InRange(This,pRange,pb)
#define ITextSelection2_InStory(This,pRange,pb) (This)->lpVtbl->InStory(This,pRange,pb)
#define ITextSelection2_IsEqual(This,pRange,pb) (This)->lpVtbl->IsEqual(This,pRange,pb)
#define ITextSelection2_Select(This) (This)->lpVtbl->Select(This)
#define ITextSelection2_StartOf(This,Unit,Extend,pDelta) (This)->lpVtbl->StartOf(This,Unit,Extend,pDelta)
#define ITextSelection2_EndOf(This,Unit,Extend,pDelta) (This)->lpVtbl->EndOf(This,Unit,Extend,pDelta)
#define ITextSelection2_Move(This,Unit,Count,pDelta) (This)->lpVtbl->Move(This,Unit,Count,pDelta)
#define ITextSelection2_MoveStart(This,Unit,Count,pDelta) (This)->lpVtbl->MoveStart(This,Unit,Count,pDelta)
#define ITextSelection2_MoveEnd(This,Unit,Count,pDelta) (This)->lpVtbl->MoveEnd(This,Unit,Count,pDelta)
#define ITextSelection2_MoveWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveWhile(This,Cset,Count,pDelta)
#define ITextSelection2_MoveStartWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveStartWhile(This,Cset,Count,pDelta)
#define ITextSelection2_MoveEndWhile(This,Cset,Count,pDelta) (This)->lpVtbl->MoveEndWhile(This,Cset,Count,pDelta)
#define ITextSelection2_MoveUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveUntil(This,Cset,Count,pDelta)
#define ITextSelection2_MoveStartUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveStartUntil(This,Cset,Count,pDelta)
#define ITextSelection2_MoveEndUntil(This,Cset,Count,pDelta) (This)->lpVtbl->MoveEndUntil(This,Cset,Count,pDelta)
#define ITextSelection2_FindText(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindText(This,bstr,cch,Flags,pLength)
#define ITextSelection2_FindTextStart(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindTextStart(This,bstr,cch,Flags,pLength)
#define ITextSelection2_FindTextEnd(This,bstr,cch,Flags,pLength) (This)->lpVtbl->FindTextEnd(This,bstr,cch,Flags,pLength)
#define ITextSelection2_Delete(This,Unit,Count,pDelta) (This)->lpVtbl->Delete(This,Unit,Count,pDelta)
#define ITextSelection2_Cut(This,pVar) (This)->lpVtbl->Cut(This,pVar)
#define ITextSelection2_Copy(This,pVar) (This)->lpVtbl->Copy(This,pVar)
#define ITextSelection2_Paste(This,pVar,Format) (This)->lpVtbl->Paste(This,pVar,Format)
#define ITextSelection2_CanPaste(This,pVar,Format,pb) (This)->lpVtbl->CanPaste(This,pVar,Format,pb)
#define ITextSelection2_CanEdit(This,pb) (This)->lpVtbl->CanEdit(This,pb)
#define ITextSelection2_ChangeCase(This,Type) (This)->lpVtbl->ChangeCase(This,Type)
#define ITextSelection2_GetPoint(This,Type,cx,cy) (This)->lpVtbl->GetPoint(This,Type,cx,cy)
#define ITextSelection2_SetPoint(This,x,y,Type,Extend) (This)->lpVtbl->SetPoint(This,x,y,Type,Extend)
#define ITextSelection2_ScrollIntoView(This,Value) (This)->lpVtbl->ScrollIntoView(This,Value)
#define ITextSelection2_GetEmbeddedObject(This,ppv) (This)->lpVtbl->GetEmbeddedObject(This,ppv)
/*** ITextSelection methods ***/
#define ITextSelection2_GetFlags(This,pFlags) (This)->lpVtbl->GetFlags(This,pFlags)
#define ITextSelection2_SetFlags(This,Flags) (This)->lpVtbl->SetFlags(This,Flags)
#define ITextSelection2_GetType(This,pType) (This)->lpVtbl->GetType(This,pType)
#define ITextSelection2_MoveLeft(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveLeft(This,Unit,Count,Extend,pDelta)
#define ITextSelection2_MoveRight(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveRight(This,Unit,Count,Extend,pDelta)
#define ITextSelection2_MoveUp(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveUp(This,Unit,Count,Extend,pDelta)
#define ITextSelection2_MoveDown(This,Unit,Count,Extend,pDelta) (This)->lpVtbl->MoveDown(This,Unit,Count,Extend,pDelta)
#define ITextSelection2_HomeKey(This,Unit,Extend,pDelta) (This)->lpVtbl->HomeKey(This,Unit,Extend,pDelta)
#define ITextSelection2_EndKey(This,Unit,Extend,pDelta) (This)->lpVtbl->EndKey(This,Unit,Extend,pDelta)
#define ITextSelection2_TypeText(This,bstr) (This)->lpVtbl->TypeText(This,bstr)
/*** ITextRange2 methods ***/
#define ITextSelection2_GetCch(This,count) (This)->lpVtbl->GetCch(This,count)
#define ITextSelection2_GetCells(This,cells) (This)->lpVtbl->GetCells(This,cells)
#define ITextSelection2_GetColumn(This,column) (This)->lpVtbl->GetColumn(This,column)
#define ITextSelection2_GetCount(This,count) (This)->lpVtbl->GetCount(This,count)
#define ITextSelection2_GetDuplicate2(This,range) (This)->lpVtbl->GetDuplicate2(This,range)
#define ITextSelection2_GetFont2(This,font) (This)->lpVtbl->GetFont2(This,font)
#define ITextSelection2_SetFont2(This,font) (This)->lpVtbl->SetFont2(This,font)
#define ITextSelection2_GetFormattedText2(This,range) (This)->lpVtbl->GetFormattedText2(This,range)
#define ITextSelection2_SetFormattedText2(This,range) (This)->lpVtbl->SetFormattedText2(This,range)
#define ITextSelection2_GetGravity(This,value) (This)->lpVtbl->GetGravity(This,value)
#define ITextSelection2_SetGravity(This,value) (This)->lpVtbl->SetGravity(This,value)
#define ITextSelection2_GetPara2(This,para) (This)->lpVtbl->GetPara2(This,para)
#define ITextSelection2_SetPara2(This,para) (This)->lpVtbl->SetPara2(This,para)
#define ITextSelection2_GetRow(This,row) (This)->lpVtbl->GetRow(This,row)
#define ITextSelection2_GetStartPara(This,value) (This)->lpVtbl->GetStartPara(This,value)
#define ITextSelection2_GetTable(This,table) (This)->lpVtbl->GetTable(This,table)
#define ITextSelection2_GetURL(This,url) (This)->lpVtbl->GetURL(This,url)
#define ITextSelection2_SetURL(This,url) (This)->lpVtbl->SetURL(This,url)
#define ITextSelection2_AddSubrange(This,cp1,cp2,activate) (This)->lpVtbl->AddSubrange(This,cp1,cp2,activate)
#define ITextSelection2_BuildUpMath(This,flags) (This)->lpVtbl->BuildUpMath(This,flags)
#define ITextSelection2_DeleteSubrange(This,first,lim) (This)->lpVtbl->DeleteSubrange(This,first,lim)
#define ITextSelection2_Find(This,range,count,flags,delta) (This)->lpVtbl->Find(This,range,count,flags,delta)
#define ITextSelection2_GetChar2(This,ch,offset) (This)->lpVtbl->GetChar2(This,ch,offset)
#define ITextSelection2_GetDropCap(This,line,pos) (This)->lpVtbl->GetDropCap(This,line,pos)
#define ITextSelection2_GetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol,level) (This)->lpVtbl->GetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol,level)
#define ITextSelection2_GetProperty(This,type,value) (This)->lpVtbl->GetProperty(This,type,value)
#define ITextSelection2_GetRect(This,type,left,top,right,bottom,hit) (This)->lpVtbl->GetRect(This,type,left,top,right,bottom,hit)
#define ITextSelection2_GetSubrange(This,subrange,first,limit) (This)->lpVtbl->GetSubrange(This,subrange,first,limit)
#define ITextSelection2_GetText2(This,flags,str) (This)->lpVtbl->GetText2(This,flags,str)
#define ITextSelection2_HexToUnicode(This) (This)->lpVtbl->HexToUnicode(This)
#define ITextSelection2_InsertTable(This,col,row,autofit) (This)->lpVtbl->InsertTable(This,col,row,autofit)
#define ITextSelection2_Linearize(This,flags) (This)->lpVtbl->Linearize(This,flags)
#define ITextSelection2_SetActiveSubrange(This,anchor,active) (This)->lpVtbl->SetActiveSubrange(This,anchor,active)
#define ITextSelection2_SetDropCap(This,line,pos) (This)->lpVtbl->SetDropCap(This,line,pos)
#define ITextSelection2_SetProperty(This,type,value) (This)->lpVtbl->SetProperty(This,type,value)
#define ITextSelection2_SetText2(This,flags,str) (This)->lpVtbl->SetText2(This,flags,str)
#define ITextSelection2_UnicodeToHex(This) (This)->lpVtbl->UnicodeToHex(This)
#define ITextSelection2_SetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol) (This)->lpVtbl->SetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol)
#define ITextSelection2_GetMathFunctionType(This,str,value) (This)->lpVtbl->GetMathFunctionType(This,str,value)
#define ITextSelection2_InsertImage(This,width,height,ascent,type,alttext,stream) (This)->lpVtbl->InsertImage(This,width,height,ascent,type,alttext,stream)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextSelection2_QueryInterface(ITextSelection2* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextSelection2_AddRef(ITextSelection2* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextSelection2_Release(ITextSelection2* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextSelection2_GetTypeInfoCount(ITextSelection2* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextSelection2_GetTypeInfo(ITextSelection2* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextSelection2_GetIDsOfNames(ITextSelection2* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextSelection2_Invoke(ITextSelection2* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextRange methods ***/
static inline HRESULT ITextSelection2_GetText(ITextSelection2* This,BSTR *pbstr) {
    return This->lpVtbl->GetText(This,pbstr);
}
static inline HRESULT ITextSelection2_SetText(ITextSelection2* This,BSTR bstr) {
    return This->lpVtbl->SetText(This,bstr);
}
static inline HRESULT ITextSelection2_GetChar(ITextSelection2* This,LONG *pch) {
    return This->lpVtbl->GetChar(This,pch);
}
static inline HRESULT ITextSelection2_SetChar(ITextSelection2* This,LONG ch) {
    return This->lpVtbl->SetChar(This,ch);
}
static inline HRESULT ITextSelection2_GetDuplicate(ITextSelection2* This,ITextRange **ppRange) {
    return This->lpVtbl->GetDuplicate(This,ppRange);
}
static inline HRESULT ITextSelection2_GetFormattedText(ITextSelection2* This,ITextRange **ppRange) {
    return This->lpVtbl->GetFormattedText(This,ppRange);
}
static inline HRESULT ITextSelection2_SetFormattedText(ITextSelection2* This,ITextRange *pRange) {
    return This->lpVtbl->SetFormattedText(This,pRange);
}
static inline HRESULT ITextSelection2_GetStart(ITextSelection2* This,LONG *pcpFirst) {
    return This->lpVtbl->GetStart(This,pcpFirst);
}
static inline HRESULT ITextSelection2_SetStart(ITextSelection2* This,LONG cpFirst) {
    return This->lpVtbl->SetStart(This,cpFirst);
}
static inline HRESULT ITextSelection2_GetEnd(ITextSelection2* This,LONG *pcpLim) {
    return This->lpVtbl->GetEnd(This,pcpLim);
}
static inline HRESULT ITextSelection2_SetEnd(ITextSelection2* This,LONG cpLim) {
    return This->lpVtbl->SetEnd(This,cpLim);
}
static inline HRESULT ITextSelection2_GetFont(ITextSelection2* This,ITextFont **pFont) {
    return This->lpVtbl->GetFont(This,pFont);
}
static inline HRESULT ITextSelection2_SetFont(ITextSelection2* This,ITextFont *pFont) {
    return This->lpVtbl->SetFont(This,pFont);
}
static inline HRESULT ITextSelection2_GetPara(ITextSelection2* This,ITextPara **ppPara) {
    return This->lpVtbl->GetPara(This,ppPara);
}
static inline HRESULT ITextSelection2_SetPara(ITextSelection2* This,ITextPara *pPara) {
    return This->lpVtbl->SetPara(This,pPara);
}
static inline HRESULT ITextSelection2_GetStoryLength(ITextSelection2* This,LONG *pcch) {
    return This->lpVtbl->GetStoryLength(This,pcch);
}
static inline HRESULT ITextSelection2_GetStoryType(ITextSelection2* This,LONG *pValue) {
    return This->lpVtbl->GetStoryType(This,pValue);
}
static inline HRESULT ITextSelection2_Collapse(ITextSelection2* This,LONG bStart) {
    return This->lpVtbl->Collapse(This,bStart);
}
static inline HRESULT ITextSelection2_Expand(ITextSelection2* This,LONG Unit,LONG *pDelta) {
    return This->lpVtbl->Expand(This,Unit,pDelta);
}
static inline HRESULT ITextSelection2_GetIndex(ITextSelection2* This,LONG Unit,LONG *pIndex) {
    return This->lpVtbl->GetIndex(This,Unit,pIndex);
}
static inline HRESULT ITextSelection2_SetIndex(ITextSelection2* This,LONG Unit,LONG Index,LONG Extend) {
    return This->lpVtbl->SetIndex(This,Unit,Index,Extend);
}
static inline HRESULT ITextSelection2_SetRange(ITextSelection2* This,LONG anchor,LONG active) {
    return This->lpVtbl->SetRange(This,anchor,active);
}
static inline HRESULT ITextSelection2_InRange(ITextSelection2* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->InRange(This,pRange,pb);
}
static inline HRESULT ITextSelection2_InStory(ITextSelection2* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->InStory(This,pRange,pb);
}
static inline HRESULT ITextSelection2_IsEqual(ITextSelection2* This,ITextRange *pRange,LONG *pb) {
    return This->lpVtbl->IsEqual(This,pRange,pb);
}
static inline HRESULT ITextSelection2_Select(ITextSelection2* This) {
    return This->lpVtbl->Select(This);
}
static inline HRESULT ITextSelection2_StartOf(ITextSelection2* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->StartOf(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextSelection2_EndOf(ITextSelection2* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->EndOf(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextSelection2_Move(ITextSelection2* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->Move(This,Unit,Count,pDelta);
}
static inline HRESULT ITextSelection2_MoveStart(ITextSelection2* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStart(This,Unit,Count,pDelta);
}
static inline HRESULT ITextSelection2_MoveEnd(ITextSelection2* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEnd(This,Unit,Count,pDelta);
}
static inline HRESULT ITextSelection2_MoveWhile(ITextSelection2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection2_MoveStartWhile(ITextSelection2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStartWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection2_MoveEndWhile(ITextSelection2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEndWhile(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection2_MoveUntil(ITextSelection2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection2_MoveStartUntil(ITextSelection2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveStartUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection2_MoveEndUntil(ITextSelection2* This,VARIANT *Cset,LONG Count,LONG *pDelta) {
    return This->lpVtbl->MoveEndUntil(This,Cset,Count,pDelta);
}
static inline HRESULT ITextSelection2_FindText(ITextSelection2* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindText(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextSelection2_FindTextStart(ITextSelection2* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindTextStart(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextSelection2_FindTextEnd(ITextSelection2* This,BSTR bstr,LONG cch,LONG Flags,LONG *pLength) {
    return This->lpVtbl->FindTextEnd(This,bstr,cch,Flags,pLength);
}
static inline HRESULT ITextSelection2_Delete(ITextSelection2* This,LONG Unit,LONG Count,LONG *pDelta) {
    return This->lpVtbl->Delete(This,Unit,Count,pDelta);
}
static inline HRESULT ITextSelection2_Cut(ITextSelection2* This,VARIANT *pVar) {
    return This->lpVtbl->Cut(This,pVar);
}
static inline HRESULT ITextSelection2_Copy(ITextSelection2* This,VARIANT *pVar) {
    return This->lpVtbl->Copy(This,pVar);
}
static inline HRESULT ITextSelection2_Paste(ITextSelection2* This,VARIANT *pVar,LONG Format) {
    return This->lpVtbl->Paste(This,pVar,Format);
}
static inline HRESULT ITextSelection2_CanPaste(ITextSelection2* This,VARIANT *pVar,LONG Format,LONG *pb) {
    return This->lpVtbl->CanPaste(This,pVar,Format,pb);
}
static inline HRESULT ITextSelection2_CanEdit(ITextSelection2* This,LONG *pb) {
    return This->lpVtbl->CanEdit(This,pb);
}
static inline HRESULT ITextSelection2_ChangeCase(ITextSelection2* This,LONG Type) {
    return This->lpVtbl->ChangeCase(This,Type);
}
static inline HRESULT ITextSelection2_GetPoint(ITextSelection2* This,LONG Type,LONG *cx,LONG *cy) {
    return This->lpVtbl->GetPoint(This,Type,cx,cy);
}
static inline HRESULT ITextSelection2_SetPoint(ITextSelection2* This,LONG x,LONG y,LONG Type,LONG Extend) {
    return This->lpVtbl->SetPoint(This,x,y,Type,Extend);
}
static inline HRESULT ITextSelection2_ScrollIntoView(ITextSelection2* This,LONG Value) {
    return This->lpVtbl->ScrollIntoView(This,Value);
}
static inline HRESULT ITextSelection2_GetEmbeddedObject(ITextSelection2* This,IUnknown **ppv) {
    return This->lpVtbl->GetEmbeddedObject(This,ppv);
}
/*** ITextSelection methods ***/
static inline HRESULT ITextSelection2_GetFlags(ITextSelection2* This,LONG *pFlags) {
    return This->lpVtbl->GetFlags(This,pFlags);
}
static inline HRESULT ITextSelection2_SetFlags(ITextSelection2* This,LONG Flags) {
    return This->lpVtbl->SetFlags(This,Flags);
}
static inline HRESULT ITextSelection2_GetType(ITextSelection2* This,LONG *pType) {
    return This->lpVtbl->GetType(This,pType);
}
static inline HRESULT ITextSelection2_MoveLeft(ITextSelection2* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveLeft(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextSelection2_MoveRight(ITextSelection2* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveRight(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextSelection2_MoveUp(ITextSelection2* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveUp(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextSelection2_MoveDown(ITextSelection2* This,LONG Unit,LONG Count,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->MoveDown(This,Unit,Count,Extend,pDelta);
}
static inline HRESULT ITextSelection2_HomeKey(ITextSelection2* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->HomeKey(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextSelection2_EndKey(ITextSelection2* This,LONG Unit,LONG Extend,LONG *pDelta) {
    return This->lpVtbl->EndKey(This,Unit,Extend,pDelta);
}
static inline HRESULT ITextSelection2_TypeText(ITextSelection2* This,BSTR bstr) {
    return This->lpVtbl->TypeText(This,bstr);
}
/*** ITextRange2 methods ***/
static inline HRESULT ITextSelection2_GetCch(ITextSelection2* This,LONG *count) {
    return This->lpVtbl->GetCch(This,count);
}
static inline HRESULT ITextSelection2_GetCells(ITextSelection2* This,IUnknown **cells) {
    return This->lpVtbl->GetCells(This,cells);
}
static inline HRESULT ITextSelection2_GetColumn(ITextSelection2* This,IUnknown **column) {
    return This->lpVtbl->GetColumn(This,column);
}
static inline HRESULT ITextSelection2_GetCount(ITextSelection2* This,LONG *count) {
    return This->lpVtbl->GetCount(This,count);
}
static inline HRESULT ITextSelection2_GetDuplicate2(ITextSelection2* This,ITextRange2 **range) {
    return This->lpVtbl->GetDuplicate2(This,range);
}
static inline HRESULT ITextSelection2_GetFont2(ITextSelection2* This,ITextFont2 **font) {
    return This->lpVtbl->GetFont2(This,font);
}
static inline HRESULT ITextSelection2_SetFont2(ITextSelection2* This,ITextFont2 *font) {
    return This->lpVtbl->SetFont2(This,font);
}
static inline HRESULT ITextSelection2_GetFormattedText2(ITextSelection2* This,ITextRange2 **range) {
    return This->lpVtbl->GetFormattedText2(This,range);
}
static inline HRESULT ITextSelection2_SetFormattedText2(ITextSelection2* This,ITextRange2 *range) {
    return This->lpVtbl->SetFormattedText2(This,range);
}
static inline HRESULT ITextSelection2_GetGravity(ITextSelection2* This,LONG *value) {
    return This->lpVtbl->GetGravity(This,value);
}
static inline HRESULT ITextSelection2_SetGravity(ITextSelection2* This,LONG value) {
    return This->lpVtbl->SetGravity(This,value);
}
static inline HRESULT ITextSelection2_GetPara2(ITextSelection2* This,ITextPara2 **para) {
    return This->lpVtbl->GetPara2(This,para);
}
static inline HRESULT ITextSelection2_SetPara2(ITextSelection2* This,ITextPara2 *para) {
    return This->lpVtbl->SetPara2(This,para);
}
static inline HRESULT ITextSelection2_GetRow(ITextSelection2* This,ITextRow **row) {
    return This->lpVtbl->GetRow(This,row);
}
static inline HRESULT ITextSelection2_GetStartPara(ITextSelection2* This,LONG *value) {
    return This->lpVtbl->GetStartPara(This,value);
}
static inline HRESULT ITextSelection2_GetTable(ITextSelection2* This,IUnknown **table) {
    return This->lpVtbl->GetTable(This,table);
}
static inline HRESULT ITextSelection2_GetURL(ITextSelection2* This,BSTR *url) {
    return This->lpVtbl->GetURL(This,url);
}
static inline HRESULT ITextSelection2_SetURL(ITextSelection2* This,BSTR url) {
    return This->lpVtbl->SetURL(This,url);
}
static inline HRESULT ITextSelection2_AddSubrange(ITextSelection2* This,LONG cp1,LONG cp2,LONG activate) {
    return This->lpVtbl->AddSubrange(This,cp1,cp2,activate);
}
static inline HRESULT ITextSelection2_BuildUpMath(ITextSelection2* This,LONG flags) {
    return This->lpVtbl->BuildUpMath(This,flags);
}
static inline HRESULT ITextSelection2_DeleteSubrange(ITextSelection2* This,LONG first,LONG lim) {
    return This->lpVtbl->DeleteSubrange(This,first,lim);
}
static inline HRESULT ITextSelection2_Find(ITextSelection2* This,ITextRange2 *range,LONG count,LONG flags,LONG *delta) {
    return This->lpVtbl->Find(This,range,count,flags,delta);
}
static inline HRESULT ITextSelection2_GetChar2(ITextSelection2* This,LONG *ch,LONG offset) {
    return This->lpVtbl->GetChar2(This,ch,offset);
}
static inline HRESULT ITextSelection2_GetDropCap(ITextSelection2* This,LONG *line,LONG *pos) {
    return This->lpVtbl->GetDropCap(This,line,pos);
}
static inline HRESULT ITextSelection2_GetInlineObject(ITextSelection2* This,LONG *type,LONG *align,LONG *ch,LONG *ch1,LONG *ch2,LONG *count,LONG *texstyle,LONG *ccol,LONG *level) {
    return This->lpVtbl->GetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol,level);
}
static inline HRESULT ITextSelection2_GetProperty(ITextSelection2* This,LONG type,LONG *value) {
    return This->lpVtbl->GetProperty(This,type,value);
}
static inline HRESULT ITextSelection2_GetRect(ITextSelection2* This,LONG type,LONG *left,LONG *top,LONG *right,LONG *bottom,LONG *hit) {
    return This->lpVtbl->GetRect(This,type,left,top,right,bottom,hit);
}
static inline HRESULT ITextSelection2_GetSubrange(ITextSelection2* This,LONG subrange,LONG *first,LONG *limit) {
    return This->lpVtbl->GetSubrange(This,subrange,first,limit);
}
static inline HRESULT ITextSelection2_GetText2(ITextSelection2* This,LONG flags,BSTR *str) {
    return This->lpVtbl->GetText2(This,flags,str);
}
static inline HRESULT ITextSelection2_HexToUnicode(ITextSelection2* This) {
    return This->lpVtbl->HexToUnicode(This);
}
static inline HRESULT ITextSelection2_InsertTable(ITextSelection2* This,LONG col,LONG row,LONG autofit) {
    return This->lpVtbl->InsertTable(This,col,row,autofit);
}
static inline HRESULT ITextSelection2_Linearize(ITextSelection2* This,LONG flags) {
    return This->lpVtbl->Linearize(This,flags);
}
static inline HRESULT ITextSelection2_SetActiveSubrange(ITextSelection2* This,LONG anchor,LONG active) {
    return This->lpVtbl->SetActiveSubrange(This,anchor,active);
}
static inline HRESULT ITextSelection2_SetDropCap(ITextSelection2* This,LONG line,LONG pos) {
    return This->lpVtbl->SetDropCap(This,line,pos);
}
static inline HRESULT ITextSelection2_SetProperty(ITextSelection2* This,LONG type,LONG value) {
    return This->lpVtbl->SetProperty(This,type,value);
}
static inline HRESULT ITextSelection2_SetText2(ITextSelection2* This,LONG flags,BSTR str) {
    return This->lpVtbl->SetText2(This,flags,str);
}
static inline HRESULT ITextSelection2_UnicodeToHex(ITextSelection2* This) {
    return This->lpVtbl->UnicodeToHex(This);
}
static inline HRESULT ITextSelection2_SetInlineObject(ITextSelection2* This,LONG type,LONG align,LONG ch,LONG ch1,LONG ch2,LONG count,LONG texstyle,LONG ccol) {
    return This->lpVtbl->SetInlineObject(This,type,align,ch,ch1,ch2,count,texstyle,ccol);
}
static inline HRESULT ITextSelection2_GetMathFunctionType(ITextSelection2* This,BSTR str,LONG *value) {
    return This->lpVtbl->GetMathFunctionType(This,str,value);
}
static inline HRESULT ITextSelection2_InsertImage(ITextSelection2* This,LONG width,LONG height,LONG ascent,LONG type,BSTR alttext,IStream *stream) {
    return This->lpVtbl->InsertImage(This,width,height,ascent,type,alttext,stream);
}
#endif
#endif

#endif


#endif  /* __ITextSelection2_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITextFont interface
 */
#ifndef __ITextFont_INTERFACE_DEFINED__
#define __ITextFont_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextFont, 0x8cc497c3, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8cc497c3-a1df-11ce-8098-00aa0047be5d")
ITextFont : public IDispatch
{
    virtual HRESULT STDMETHODCALLTYPE GetDuplicate(
        ITextFont **ppFont) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDuplicate(
        ITextFont *pFont) = 0;

    virtual HRESULT STDMETHODCALLTYPE CanChange(
        LONG *pB) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEqual(
        ITextFont *pFont,
        LONG *pB) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStyle(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStyle(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAllCaps(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAllCaps(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAnimation(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAnimation(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetBackColor(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetBackColor(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetBold(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetBold(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEmboss(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetEmboss(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetForeColor(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetForeColor(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetHidden(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetHidden(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetEngrave(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetEngrave(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetItalic(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetItalic(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetKerning(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetKerning(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetLanguageID(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetLanguageID(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetName(
        BSTR *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetName(
        BSTR Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetOutline(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetOutline(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPosition(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPosition(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetProtected(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetProtected(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetShadow(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetShadow(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSize(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSize(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSmallCaps(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSmallCaps(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSpacing(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSpacing(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStrikeThrough(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStrikeThrough(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSubscript(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSubscript(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSuperscript(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSuperscript(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetUnderline(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetUnderline(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetWeight(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetWeight(
        LONG Value) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextFont, 0x8cc497c3, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d)
#endif
#else
typedef struct ITextFontVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextFont *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextFont *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextFont *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextFont *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextFont *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextFont *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextFont *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextFont methods ***/
    HRESULT (STDMETHODCALLTYPE *GetDuplicate)(
        ITextFont *This,
        ITextFont **ppFont);

    HRESULT (STDMETHODCALLTYPE *SetDuplicate)(
        ITextFont *This,
        ITextFont *pFont);

    HRESULT (STDMETHODCALLTYPE *CanChange)(
        ITextFont *This,
        LONG *pB);

    HRESULT (STDMETHODCALLTYPE *IsEqual)(
        ITextFont *This,
        ITextFont *pFont,
        LONG *pB);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetStyle)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetStyle)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetAllCaps)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetAllCaps)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetAnimation)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetAnimation)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetBackColor)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetBackColor)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetBold)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetBold)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetEmboss)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetEmboss)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetForeColor)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetForeColor)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetHidden)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetHidden)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetEngrave)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetEngrave)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetItalic)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetItalic)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetKerning)(
        ITextFont *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetKerning)(
        ITextFont *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *GetLanguageID)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetLanguageID)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetName)(
        ITextFont *This,
        BSTR *pValue);

    HRESULT (STDMETHODCALLTYPE *SetName)(
        ITextFont *This,
        BSTR Value);

    HRESULT (STDMETHODCALLTYPE *GetOutline)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetOutline)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetPosition)(
        ITextFont *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetPosition)(
        ITextFont *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *GetProtected)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetProtected)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetShadow)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetShadow)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetSize)(
        ITextFont *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSize)(
        ITextFont *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *GetSmallCaps)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSmallCaps)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetSpacing)(
        ITextFont *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSpacing)(
        ITextFont *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *GetStrikeThrough)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetStrikeThrough)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetSubscript)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSubscript)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetSuperscript)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSuperscript)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetUnderline)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetUnderline)(
        ITextFont *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetWeight)(
        ITextFont *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetWeight)(
        ITextFont *This,
        LONG Value);

    END_INTERFACE
} ITextFontVtbl;

interface ITextFont {
    CONST_VTBL ITextFontVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextFont_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextFont_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextFont_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextFont_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextFont_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextFont_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextFont_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextFont methods ***/
#define ITextFont_GetDuplicate(This,ppFont) (This)->lpVtbl->GetDuplicate(This,ppFont)
#define ITextFont_SetDuplicate(This,pFont) (This)->lpVtbl->SetDuplicate(This,pFont)
#define ITextFont_CanChange(This,pB) (This)->lpVtbl->CanChange(This,pB)
#define ITextFont_IsEqual(This,pFont,pB) (This)->lpVtbl->IsEqual(This,pFont,pB)
#define ITextFont_Reset(This,Value) (This)->lpVtbl->Reset(This,Value)
#define ITextFont_GetStyle(This,pValue) (This)->lpVtbl->GetStyle(This,pValue)
#define ITextFont_SetStyle(This,Value) (This)->lpVtbl->SetStyle(This,Value)
#define ITextFont_GetAllCaps(This,pValue) (This)->lpVtbl->GetAllCaps(This,pValue)
#define ITextFont_SetAllCaps(This,Value) (This)->lpVtbl->SetAllCaps(This,Value)
#define ITextFont_GetAnimation(This,pValue) (This)->lpVtbl->GetAnimation(This,pValue)
#define ITextFont_SetAnimation(This,Value) (This)->lpVtbl->SetAnimation(This,Value)
#define ITextFont_GetBackColor(This,pValue) (This)->lpVtbl->GetBackColor(This,pValue)
#define ITextFont_SetBackColor(This,Value) (This)->lpVtbl->SetBackColor(This,Value)
#define ITextFont_GetBold(This,pValue) (This)->lpVtbl->GetBold(This,pValue)
#define ITextFont_SetBold(This,Value) (This)->lpVtbl->SetBold(This,Value)
#define ITextFont_GetEmboss(This,pValue) (This)->lpVtbl->GetEmboss(This,pValue)
#define ITextFont_SetEmboss(This,Value) (This)->lpVtbl->SetEmboss(This,Value)
#define ITextFont_GetForeColor(This,pValue) (This)->lpVtbl->GetForeColor(This,pValue)
#define ITextFont_SetForeColor(This,Value) (This)->lpVtbl->SetForeColor(This,Value)
#define ITextFont_GetHidden(This,pValue) (This)->lpVtbl->GetHidden(This,pValue)
#define ITextFont_SetHidden(This,Value) (This)->lpVtbl->SetHidden(This,Value)
#define ITextFont_GetEngrave(This,pValue) (This)->lpVtbl->GetEngrave(This,pValue)
#define ITextFont_SetEngrave(This,Value) (This)->lpVtbl->SetEngrave(This,Value)
#define ITextFont_GetItalic(This,pValue) (This)->lpVtbl->GetItalic(This,pValue)
#define ITextFont_SetItalic(This,Value) (This)->lpVtbl->SetItalic(This,Value)
#define ITextFont_GetKerning(This,pValue) (This)->lpVtbl->GetKerning(This,pValue)
#define ITextFont_SetKerning(This,Value) (This)->lpVtbl->SetKerning(This,Value)
#define ITextFont_GetLanguageID(This,pValue) (This)->lpVtbl->GetLanguageID(This,pValue)
#define ITextFont_SetLanguageID(This,Value) (This)->lpVtbl->SetLanguageID(This,Value)
#define ITextFont_GetName(This,pValue) (This)->lpVtbl->GetName(This,pValue)
#define ITextFont_SetName(This,Value) (This)->lpVtbl->SetName(This,Value)
#define ITextFont_GetOutline(This,pValue) (This)->lpVtbl->GetOutline(This,pValue)
#define ITextFont_SetOutline(This,Value) (This)->lpVtbl->SetOutline(This,Value)
#define ITextFont_GetPosition(This,pValue) (This)->lpVtbl->GetPosition(This,pValue)
#define ITextFont_SetPosition(This,Value) (This)->lpVtbl->SetPosition(This,Value)
#define ITextFont_GetProtected(This,pValue) (This)->lpVtbl->GetProtected(This,pValue)
#define ITextFont_SetProtected(This,Value) (This)->lpVtbl->SetProtected(This,Value)
#define ITextFont_GetShadow(This,pValue) (This)->lpVtbl->GetShadow(This,pValue)
#define ITextFont_SetShadow(This,Value) (This)->lpVtbl->SetShadow(This,Value)
#define ITextFont_GetSize(This,pValue) (This)->lpVtbl->GetSize(This,pValue)
#define ITextFont_SetSize(This,Value) (This)->lpVtbl->SetSize(This,Value)
#define ITextFont_GetSmallCaps(This,pValue) (This)->lpVtbl->GetSmallCaps(This,pValue)
#define ITextFont_SetSmallCaps(This,Value) (This)->lpVtbl->SetSmallCaps(This,Value)
#define ITextFont_GetSpacing(This,pValue) (This)->lpVtbl->GetSpacing(This,pValue)
#define ITextFont_SetSpacing(This,Value) (This)->lpVtbl->SetSpacing(This,Value)
#define ITextFont_GetStrikeThrough(This,pValue) (This)->lpVtbl->GetStrikeThrough(This,pValue)
#define ITextFont_SetStrikeThrough(This,Value) (This)->lpVtbl->SetStrikeThrough(This,Value)
#define ITextFont_GetSubscript(This,pValue) (This)->lpVtbl->GetSubscript(This,pValue)
#define ITextFont_SetSubscript(This,Value) (This)->lpVtbl->SetSubscript(This,Value)
#define ITextFont_GetSuperscript(This,pValue) (This)->lpVtbl->GetSuperscript(This,pValue)
#define ITextFont_SetSuperscript(This,Value) (This)->lpVtbl->SetSuperscript(This,Value)
#define ITextFont_GetUnderline(This,pValue) (This)->lpVtbl->GetUnderline(This,pValue)
#define ITextFont_SetUnderline(This,Value) (This)->lpVtbl->SetUnderline(This,Value)
#define ITextFont_GetWeight(This,pValue) (This)->lpVtbl->GetWeight(This,pValue)
#define ITextFont_SetWeight(This,Value) (This)->lpVtbl->SetWeight(This,Value)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextFont_QueryInterface(ITextFont* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextFont_AddRef(ITextFont* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextFont_Release(ITextFont* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextFont_GetTypeInfoCount(ITextFont* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextFont_GetTypeInfo(ITextFont* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextFont_GetIDsOfNames(ITextFont* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextFont_Invoke(ITextFont* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextFont methods ***/
static inline HRESULT ITextFont_GetDuplicate(ITextFont* This,ITextFont **ppFont) {
    return This->lpVtbl->GetDuplicate(This,ppFont);
}
static inline HRESULT ITextFont_SetDuplicate(ITextFont* This,ITextFont *pFont) {
    return This->lpVtbl->SetDuplicate(This,pFont);
}
static inline HRESULT ITextFont_CanChange(ITextFont* This,LONG *pB) {
    return This->lpVtbl->CanChange(This,pB);
}
static inline HRESULT ITextFont_IsEqual(ITextFont* This,ITextFont *pFont,LONG *pB) {
    return This->lpVtbl->IsEqual(This,pFont,pB);
}
static inline HRESULT ITextFont_Reset(ITextFont* This,LONG Value) {
    return This->lpVtbl->Reset(This,Value);
}
static inline HRESULT ITextFont_GetStyle(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetStyle(This,pValue);
}
static inline HRESULT ITextFont_SetStyle(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetStyle(This,Value);
}
static inline HRESULT ITextFont_GetAllCaps(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetAllCaps(This,pValue);
}
static inline HRESULT ITextFont_SetAllCaps(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetAllCaps(This,Value);
}
static inline HRESULT ITextFont_GetAnimation(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetAnimation(This,pValue);
}
static inline HRESULT ITextFont_SetAnimation(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetAnimation(This,Value);
}
static inline HRESULT ITextFont_GetBackColor(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetBackColor(This,pValue);
}
static inline HRESULT ITextFont_SetBackColor(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetBackColor(This,Value);
}
static inline HRESULT ITextFont_GetBold(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetBold(This,pValue);
}
static inline HRESULT ITextFont_SetBold(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetBold(This,Value);
}
static inline HRESULT ITextFont_GetEmboss(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetEmboss(This,pValue);
}
static inline HRESULT ITextFont_SetEmboss(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetEmboss(This,Value);
}
static inline HRESULT ITextFont_GetForeColor(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetForeColor(This,pValue);
}
static inline HRESULT ITextFont_SetForeColor(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetForeColor(This,Value);
}
static inline HRESULT ITextFont_GetHidden(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetHidden(This,pValue);
}
static inline HRESULT ITextFont_SetHidden(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetHidden(This,Value);
}
static inline HRESULT ITextFont_GetEngrave(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetEngrave(This,pValue);
}
static inline HRESULT ITextFont_SetEngrave(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetEngrave(This,Value);
}
static inline HRESULT ITextFont_GetItalic(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetItalic(This,pValue);
}
static inline HRESULT ITextFont_SetItalic(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetItalic(This,Value);
}
static inline HRESULT ITextFont_GetKerning(ITextFont* This,float *pValue) {
    return This->lpVtbl->GetKerning(This,pValue);
}
static inline HRESULT ITextFont_SetKerning(ITextFont* This,float Value) {
    return This->lpVtbl->SetKerning(This,Value);
}
static inline HRESULT ITextFont_GetLanguageID(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetLanguageID(This,pValue);
}
static inline HRESULT ITextFont_SetLanguageID(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetLanguageID(This,Value);
}
static inline HRESULT ITextFont_GetName(ITextFont* This,BSTR *pValue) {
    return This->lpVtbl->GetName(This,pValue);
}
static inline HRESULT ITextFont_SetName(ITextFont* This,BSTR Value) {
    return This->lpVtbl->SetName(This,Value);
}
static inline HRESULT ITextFont_GetOutline(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetOutline(This,pValue);
}
static inline HRESULT ITextFont_SetOutline(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetOutline(This,Value);
}
static inline HRESULT ITextFont_GetPosition(ITextFont* This,float *pValue) {
    return This->lpVtbl->GetPosition(This,pValue);
}
static inline HRESULT ITextFont_SetPosition(ITextFont* This,float Value) {
    return This->lpVtbl->SetPosition(This,Value);
}
static inline HRESULT ITextFont_GetProtected(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetProtected(This,pValue);
}
static inline HRESULT ITextFont_SetProtected(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetProtected(This,Value);
}
static inline HRESULT ITextFont_GetShadow(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetShadow(This,pValue);
}
static inline HRESULT ITextFont_SetShadow(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetShadow(This,Value);
}
static inline HRESULT ITextFont_GetSize(ITextFont* This,float *pValue) {
    return This->lpVtbl->GetSize(This,pValue);
}
static inline HRESULT ITextFont_SetSize(ITextFont* This,float Value) {
    return This->lpVtbl->SetSize(This,Value);
}
static inline HRESULT ITextFont_GetSmallCaps(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetSmallCaps(This,pValue);
}
static inline HRESULT ITextFont_SetSmallCaps(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetSmallCaps(This,Value);
}
static inline HRESULT ITextFont_GetSpacing(ITextFont* This,float *pValue) {
    return This->lpVtbl->GetSpacing(This,pValue);
}
static inline HRESULT ITextFont_SetSpacing(ITextFont* This,float Value) {
    return This->lpVtbl->SetSpacing(This,Value);
}
static inline HRESULT ITextFont_GetStrikeThrough(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetStrikeThrough(This,pValue);
}
static inline HRESULT ITextFont_SetStrikeThrough(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetStrikeThrough(This,Value);
}
static inline HRESULT ITextFont_GetSubscript(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetSubscript(This,pValue);
}
static inline HRESULT ITextFont_SetSubscript(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetSubscript(This,Value);
}
static inline HRESULT ITextFont_GetSuperscript(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetSuperscript(This,pValue);
}
static inline HRESULT ITextFont_SetSuperscript(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetSuperscript(This,Value);
}
static inline HRESULT ITextFont_GetUnderline(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetUnderline(This,pValue);
}
static inline HRESULT ITextFont_SetUnderline(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetUnderline(This,Value);
}
static inline HRESULT ITextFont_GetWeight(ITextFont* This,LONG *pValue) {
    return This->lpVtbl->GetWeight(This,pValue);
}
static inline HRESULT ITextFont_SetWeight(ITextFont* This,LONG Value) {
    return This->lpVtbl->SetWeight(This,Value);
}
#endif
#endif

#endif


#endif  /* __ITextFont_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITextPara interface
 */
#ifndef __ITextPara_INTERFACE_DEFINED__
#define __ITextPara_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextPara, 0x8cc497c4, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8cc497c4-a1df-11ce-8098-00aa0047be5d")
ITextPara : public IDispatch
{
    virtual HRESULT STDMETHODCALLTYPE GetDuplicate(
        ITextPara **ppPara) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDuplicate(
        ITextPara *pPara) = 0;

    virtual HRESULT STDMETHODCALLTYPE CanChange(
        LONG *pB) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsEqual(
        ITextPara *pPara,
        LONG *pB) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStyle(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStyle(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAlignment(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAlignment(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetHyphenation(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetHyphenation(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFirstLineIndent(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetKeepTogether(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetKeepTogether(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetKeepWithNext(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetKeepWithNext(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetLeftIndent(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetLineSpacing(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetLineSpacingRule(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetListAlignment(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetListAlignment(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetListLevelIndex(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetListLevelIndex(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetListStart(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetListStart(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetListTab(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetListTab(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetListType(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetListType(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetNoLineNumber(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetNoLineNumber(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPageBreakBefore(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPageBreakBefore(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRightIndent(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetRightIndent(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetIndents(
        float StartIndent,
        float LeftIndent,
        float RightIndent) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetLineSpacing(
        LONG LineSpacingRule,
        float LineSpacing) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSpaceAfter(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSpaceAfter(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSpaceBefore(
        float *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSpaceBefore(
        float Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetWidowControl(
        LONG *pValue) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetWidowControl(
        LONG Value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTabCount(
        LONG *pCount) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddTab(
        float tbPos,
        LONG tbAlign,
        LONG tbLeader) = 0;

    virtual HRESULT STDMETHODCALLTYPE ClearAllTabs(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE DeleteTab(
        float tbPos) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTab(
        LONG iTab,
        float *ptbPos,
        LONG *ptbAlign,
        LONG *ptbLeader) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextPara, 0x8cc497c4, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d)
#endif
#else
typedef struct ITextParaVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextPara *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextPara *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextPara *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextPara *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextPara *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextPara *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextPara *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextPara methods ***/
    HRESULT (STDMETHODCALLTYPE *GetDuplicate)(
        ITextPara *This,
        ITextPara **ppPara);

    HRESULT (STDMETHODCALLTYPE *SetDuplicate)(
        ITextPara *This,
        ITextPara *pPara);

    HRESULT (STDMETHODCALLTYPE *CanChange)(
        ITextPara *This,
        LONG *pB);

    HRESULT (STDMETHODCALLTYPE *IsEqual)(
        ITextPara *This,
        ITextPara *pPara,
        LONG *pB);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetStyle)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetStyle)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetAlignment)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetAlignment)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetHyphenation)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetHyphenation)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetFirstLineIndent)(
        ITextPara *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *GetKeepTogether)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetKeepTogether)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetKeepWithNext)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetKeepWithNext)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetLeftIndent)(
        ITextPara *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *GetLineSpacing)(
        ITextPara *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *GetLineSpacingRule)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *GetListAlignment)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetListAlignment)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetListLevelIndex)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetListLevelIndex)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetListStart)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetListStart)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetListTab)(
        ITextPara *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetListTab)(
        ITextPara *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *GetListType)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetListType)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetNoLineNumber)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetNoLineNumber)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetPageBreakBefore)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetPageBreakBefore)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetRightIndent)(
        ITextPara *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetRightIndent)(
        ITextPara *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *SetIndents)(
        ITextPara *This,
        float StartIndent,
        float LeftIndent,
        float RightIndent);

    HRESULT (STDMETHODCALLTYPE *SetLineSpacing)(
        ITextPara *This,
        LONG LineSpacingRule,
        float LineSpacing);

    HRESULT (STDMETHODCALLTYPE *GetSpaceAfter)(
        ITextPara *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSpaceAfter)(
        ITextPara *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *GetSpaceBefore)(
        ITextPara *This,
        float *pValue);

    HRESULT (STDMETHODCALLTYPE *SetSpaceBefore)(
        ITextPara *This,
        float Value);

    HRESULT (STDMETHODCALLTYPE *GetWidowControl)(
        ITextPara *This,
        LONG *pValue);

    HRESULT (STDMETHODCALLTYPE *SetWidowControl)(
        ITextPara *This,
        LONG Value);

    HRESULT (STDMETHODCALLTYPE *GetTabCount)(
        ITextPara *This,
        LONG *pCount);

    HRESULT (STDMETHODCALLTYPE *AddTab)(
        ITextPara *This,
        float tbPos,
        LONG tbAlign,
        LONG tbLeader);

    HRESULT (STDMETHODCALLTYPE *ClearAllTabs)(
        ITextPara *This);

    HRESULT (STDMETHODCALLTYPE *DeleteTab)(
        ITextPara *This,
        float tbPos);

    HRESULT (STDMETHODCALLTYPE *GetTab)(
        ITextPara *This,
        LONG iTab,
        float *ptbPos,
        LONG *ptbAlign,
        LONG *ptbLeader);

    END_INTERFACE
} ITextParaVtbl;

interface ITextPara {
    CONST_VTBL ITextParaVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextPara_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextPara_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextPara_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextPara_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextPara_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextPara_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextPara_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextPara methods ***/
#define ITextPara_GetDuplicate(This,ppPara) (This)->lpVtbl->GetDuplicate(This,ppPara)
#define ITextPara_SetDuplicate(This,pPara) (This)->lpVtbl->SetDuplicate(This,pPara)
#define ITextPara_CanChange(This,pB) (This)->lpVtbl->CanChange(This,pB)
#define ITextPara_IsEqual(This,pPara,pB) (This)->lpVtbl->IsEqual(This,pPara,pB)
#define ITextPara_Reset(This,Value) (This)->lpVtbl->Reset(This,Value)
#define ITextPara_GetStyle(This,pValue) (This)->lpVtbl->GetStyle(This,pValue)
#define ITextPara_SetStyle(This,Value) (This)->lpVtbl->SetStyle(This,Value)
#define ITextPara_GetAlignment(This,pValue) (This)->lpVtbl->GetAlignment(This,pValue)
#define ITextPara_SetAlignment(This,Value) (This)->lpVtbl->SetAlignment(This,Value)
#define ITextPara_GetHyphenation(This,pValue) (This)->lpVtbl->GetHyphenation(This,pValue)
#define ITextPara_SetHyphenation(This,Value) (This)->lpVtbl->SetHyphenation(This,Value)
#define ITextPara_GetFirstLineIndent(This,pValue) (This)->lpVtbl->GetFirstLineIndent(This,pValue)
#define ITextPara_GetKeepTogether(This,pValue) (This)->lpVtbl->GetKeepTogether(This,pValue)
#define ITextPara_SetKeepTogether(This,Value) (This)->lpVtbl->SetKeepTogether(This,Value)
#define ITextPara_GetKeepWithNext(This,pValue) (This)->lpVtbl->GetKeepWithNext(This,pValue)
#define ITextPara_SetKeepWithNext(This,Value) (This)->lpVtbl->SetKeepWithNext(This,Value)
#define ITextPara_GetLeftIndent(This,pValue) (This)->lpVtbl->GetLeftIndent(This,pValue)
#define ITextPara_GetLineSpacing(This,pValue) (This)->lpVtbl->GetLineSpacing(This,pValue)
#define ITextPara_GetLineSpacingRule(This,pValue) (This)->lpVtbl->GetLineSpacingRule(This,pValue)
#define ITextPara_GetListAlignment(This,pValue) (This)->lpVtbl->GetListAlignment(This,pValue)
#define ITextPara_SetListAlignment(This,Value) (This)->lpVtbl->SetListAlignment(This,Value)
#define ITextPara_GetListLevelIndex(This,pValue) (This)->lpVtbl->GetListLevelIndex(This,pValue)
#define ITextPara_SetListLevelIndex(This,Value) (This)->lpVtbl->SetListLevelIndex(This,Value)
#define ITextPara_GetListStart(This,pValue) (This)->lpVtbl->GetListStart(This,pValue)
#define ITextPara_SetListStart(This,Value) (This)->lpVtbl->SetListStart(This,Value)
#define ITextPara_GetListTab(This,pValue) (This)->lpVtbl->GetListTab(This,pValue)
#define ITextPara_SetListTab(This,Value) (This)->lpVtbl->SetListTab(This,Value)
#define ITextPara_GetListType(This,pValue) (This)->lpVtbl->GetListType(This,pValue)
#define ITextPara_SetListType(This,Value) (This)->lpVtbl->SetListType(This,Value)
#define ITextPara_GetNoLineNumber(This,pValue) (This)->lpVtbl->GetNoLineNumber(This,pValue)
#define ITextPara_SetNoLineNumber(This,Value) (This)->lpVtbl->SetNoLineNumber(This,Value)
#define ITextPara_GetPageBreakBefore(This,pValue) (This)->lpVtbl->GetPageBreakBefore(This,pValue)
#define ITextPara_SetPageBreakBefore(This,Value) (This)->lpVtbl->SetPageBreakBefore(This,Value)
#define ITextPara_GetRightIndent(This,pValue) (This)->lpVtbl->GetRightIndent(This,pValue)
#define ITextPara_SetRightIndent(This,Value) (This)->lpVtbl->SetRightIndent(This,Value)
#define ITextPara_SetIndents(This,StartIndent,LeftIndent,RightIndent) (This)->lpVtbl->SetIndents(This,StartIndent,LeftIndent,RightIndent)
#define ITextPara_SetLineSpacing(This,LineSpacingRule,LineSpacing) (This)->lpVtbl->SetLineSpacing(This,LineSpacingRule,LineSpacing)
#define ITextPara_GetSpaceAfter(This,pValue) (This)->lpVtbl->GetSpaceAfter(This,pValue)
#define ITextPara_SetSpaceAfter(This,Value) (This)->lpVtbl->SetSpaceAfter(This,Value)
#define ITextPara_GetSpaceBefore(This,pValue) (This)->lpVtbl->GetSpaceBefore(This,pValue)
#define ITextPara_SetSpaceBefore(This,Value) (This)->lpVtbl->SetSpaceBefore(This,Value)
#define ITextPara_GetWidowControl(This,pValue) (This)->lpVtbl->GetWidowControl(This,pValue)
#define ITextPara_SetWidowControl(This,Value) (This)->lpVtbl->SetWidowControl(This,Value)
#define ITextPara_GetTabCount(This,pCount) (This)->lpVtbl->GetTabCount(This,pCount)
#define ITextPara_AddTab(This,tbPos,tbAlign,tbLeader) (This)->lpVtbl->AddTab(This,tbPos,tbAlign,tbLeader)
#define ITextPara_ClearAllTabs(This) (This)->lpVtbl->ClearAllTabs(This)
#define ITextPara_DeleteTab(This,tbPos) (This)->lpVtbl->DeleteTab(This,tbPos)
#define ITextPara_GetTab(This,iTab,ptbPos,ptbAlign,ptbLeader) (This)->lpVtbl->GetTab(This,iTab,ptbPos,ptbAlign,ptbLeader)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextPara_QueryInterface(ITextPara* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextPara_AddRef(ITextPara* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextPara_Release(ITextPara* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextPara_GetTypeInfoCount(ITextPara* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextPara_GetTypeInfo(ITextPara* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextPara_GetIDsOfNames(ITextPara* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextPara_Invoke(ITextPara* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextPara methods ***/
static inline HRESULT ITextPara_GetDuplicate(ITextPara* This,ITextPara **ppPara) {
    return This->lpVtbl->GetDuplicate(This,ppPara);
}
static inline HRESULT ITextPara_SetDuplicate(ITextPara* This,ITextPara *pPara) {
    return This->lpVtbl->SetDuplicate(This,pPara);
}
static inline HRESULT ITextPara_CanChange(ITextPara* This,LONG *pB) {
    return This->lpVtbl->CanChange(This,pB);
}
static inline HRESULT ITextPara_IsEqual(ITextPara* This,ITextPara *pPara,LONG *pB) {
    return This->lpVtbl->IsEqual(This,pPara,pB);
}
static inline HRESULT ITextPara_Reset(ITextPara* This,LONG Value) {
    return This->lpVtbl->Reset(This,Value);
}
static inline HRESULT ITextPara_GetStyle(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetStyle(This,pValue);
}
static inline HRESULT ITextPara_SetStyle(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetStyle(This,Value);
}
static inline HRESULT ITextPara_GetAlignment(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetAlignment(This,pValue);
}
static inline HRESULT ITextPara_SetAlignment(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetAlignment(This,Value);
}
static inline HRESULT ITextPara_GetHyphenation(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetHyphenation(This,pValue);
}
static inline HRESULT ITextPara_SetHyphenation(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetHyphenation(This,Value);
}
static inline HRESULT ITextPara_GetFirstLineIndent(ITextPara* This,float *pValue) {
    return This->lpVtbl->GetFirstLineIndent(This,pValue);
}
static inline HRESULT ITextPara_GetKeepTogether(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetKeepTogether(This,pValue);
}
static inline HRESULT ITextPara_SetKeepTogether(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetKeepTogether(This,Value);
}
static inline HRESULT ITextPara_GetKeepWithNext(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetKeepWithNext(This,pValue);
}
static inline HRESULT ITextPara_SetKeepWithNext(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetKeepWithNext(This,Value);
}
static inline HRESULT ITextPara_GetLeftIndent(ITextPara* This,float *pValue) {
    return This->lpVtbl->GetLeftIndent(This,pValue);
}
static inline HRESULT ITextPara_GetLineSpacing(ITextPara* This,float *pValue) {
    return This->lpVtbl->GetLineSpacing(This,pValue);
}
static inline HRESULT ITextPara_GetLineSpacingRule(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetLineSpacingRule(This,pValue);
}
static inline HRESULT ITextPara_GetListAlignment(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetListAlignment(This,pValue);
}
static inline HRESULT ITextPara_SetListAlignment(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetListAlignment(This,Value);
}
static inline HRESULT ITextPara_GetListLevelIndex(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetListLevelIndex(This,pValue);
}
static inline HRESULT ITextPara_SetListLevelIndex(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetListLevelIndex(This,Value);
}
static inline HRESULT ITextPara_GetListStart(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetListStart(This,pValue);
}
static inline HRESULT ITextPara_SetListStart(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetListStart(This,Value);
}
static inline HRESULT ITextPara_GetListTab(ITextPara* This,float *pValue) {
    return This->lpVtbl->GetListTab(This,pValue);
}
static inline HRESULT ITextPara_SetListTab(ITextPara* This,float Value) {
    return This->lpVtbl->SetListTab(This,Value);
}
static inline HRESULT ITextPara_GetListType(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetListType(This,pValue);
}
static inline HRESULT ITextPara_SetListType(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetListType(This,Value);
}
static inline HRESULT ITextPara_GetNoLineNumber(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetNoLineNumber(This,pValue);
}
static inline HRESULT ITextPara_SetNoLineNumber(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetNoLineNumber(This,Value);
}
static inline HRESULT ITextPara_GetPageBreakBefore(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetPageBreakBefore(This,pValue);
}
static inline HRESULT ITextPara_SetPageBreakBefore(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetPageBreakBefore(This,Value);
}
static inline HRESULT ITextPara_GetRightIndent(ITextPara* This,float *pValue) {
    return This->lpVtbl->GetRightIndent(This,pValue);
}
static inline HRESULT ITextPara_SetRightIndent(ITextPara* This,float Value) {
    return This->lpVtbl->SetRightIndent(This,Value);
}
static inline HRESULT ITextPara_SetIndents(ITextPara* This,float StartIndent,float LeftIndent,float RightIndent) {
    return This->lpVtbl->SetIndents(This,StartIndent,LeftIndent,RightIndent);
}
static inline HRESULT ITextPara_SetLineSpacing(ITextPara* This,LONG LineSpacingRule,float LineSpacing) {
    return This->lpVtbl->SetLineSpacing(This,LineSpacingRule,LineSpacing);
}
static inline HRESULT ITextPara_GetSpaceAfter(ITextPara* This,float *pValue) {
    return This->lpVtbl->GetSpaceAfter(This,pValue);
}
static inline HRESULT ITextPara_SetSpaceAfter(ITextPara* This,float Value) {
    return This->lpVtbl->SetSpaceAfter(This,Value);
}
static inline HRESULT ITextPara_GetSpaceBefore(ITextPara* This,float *pValue) {
    return This->lpVtbl->GetSpaceBefore(This,pValue);
}
static inline HRESULT ITextPara_SetSpaceBefore(ITextPara* This,float Value) {
    return This->lpVtbl->SetSpaceBefore(This,Value);
}
static inline HRESULT ITextPara_GetWidowControl(ITextPara* This,LONG *pValue) {
    return This->lpVtbl->GetWidowControl(This,pValue);
}
static inline HRESULT ITextPara_SetWidowControl(ITextPara* This,LONG Value) {
    return This->lpVtbl->SetWidowControl(This,Value);
}
static inline HRESULT ITextPara_GetTabCount(ITextPara* This,LONG *pCount) {
    return This->lpVtbl->GetTabCount(This,pCount);
}
static inline HRESULT ITextPara_AddTab(ITextPara* This,float tbPos,LONG tbAlign,LONG tbLeader) {
    return This->lpVtbl->AddTab(This,tbPos,tbAlign,tbLeader);
}
static inline HRESULT ITextPara_ClearAllTabs(ITextPara* This) {
    return This->lpVtbl->ClearAllTabs(This);
}
static inline HRESULT ITextPara_DeleteTab(ITextPara* This,float tbPos) {
    return This->lpVtbl->DeleteTab(This,tbPos);
}
static inline HRESULT ITextPara_GetTab(ITextPara* This,LONG iTab,float *ptbPos,LONG *ptbAlign,LONG *ptbLeader) {
    return This->lpVtbl->GetTab(This,iTab,ptbPos,ptbAlign,ptbLeader);
}
#endif
#endif

#endif


#endif  /* __ITextPara_INTERFACE_DEFINED__ */

/*****************************************************************************
 * ITextStoryRanges interface
 */
#ifndef __ITextStoryRanges_INTERFACE_DEFINED__
#define __ITextStoryRanges_INTERFACE_DEFINED__

DEFINE_GUID(IID_ITextStoryRanges, 0x8cc497c5, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d);
#if defined(__cplusplus) && !defined(CINTERFACE)
MIDL_INTERFACE("8cc497c5-a1df-11ce-8098-00aa0047be5d")
ITextStoryRanges : public IDispatch
{
    virtual HRESULT STDMETHODCALLTYPE _NewEnum(
        IUnknown **ppUnkEnum) = 0;

    virtual HRESULT STDMETHODCALLTYPE Item(
        LONG Index,
        ITextRange **ppRange) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCount(
        LONG *pCount) = 0;

};
#ifdef __CRT_UUID_DECL
__CRT_UUID_DECL(ITextStoryRanges, 0x8cc497c5, 0xa1df, 0x11ce, 0x80,0x98, 0x00,0xaa,0x00,0x47,0xbe,0x5d)
#endif
#else
typedef struct ITextStoryRangesVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        ITextStoryRanges *This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        ITextStoryRanges *This);

    ULONG (STDMETHODCALLTYPE *Release)(
        ITextStoryRanges *This);

    /*** IDispatch methods ***/
    HRESULT (STDMETHODCALLTYPE *GetTypeInfoCount)(
        ITextStoryRanges *This,
        UINT *pctinfo);

    HRESULT (STDMETHODCALLTYPE *GetTypeInfo)(
        ITextStoryRanges *This,
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo);

    HRESULT (STDMETHODCALLTYPE *GetIDsOfNames)(
        ITextStoryRanges *This,
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId);

    HRESULT (STDMETHODCALLTYPE *Invoke)(
        ITextStoryRanges *This,
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr);

    /*** ITextStoryRanges methods ***/
    HRESULT (STDMETHODCALLTYPE *_NewEnum)(
        ITextStoryRanges *This,
        IUnknown **ppUnkEnum);

    HRESULT (STDMETHODCALLTYPE *Item)(
        ITextStoryRanges *This,
        LONG Index,
        ITextRange **ppRange);

    HRESULT (STDMETHODCALLTYPE *GetCount)(
        ITextStoryRanges *This,
        LONG *pCount);

    END_INTERFACE
} ITextStoryRangesVtbl;

interface ITextStoryRanges {
    CONST_VTBL ITextStoryRangesVtbl* lpVtbl;
};

#ifdef COBJMACROS
#ifndef WIDL_C_INLINE_WRAPPERS
/*** IUnknown methods ***/
#define ITextStoryRanges_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define ITextStoryRanges_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ITextStoryRanges_Release(This) (This)->lpVtbl->Release(This)
/*** IDispatch methods ***/
#define ITextStoryRanges_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define ITextStoryRanges_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define ITextStoryRanges_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define ITextStoryRanges_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
/*** ITextStoryRanges methods ***/
#define ITextStoryRanges__NewEnum(This,ppUnkEnum) (This)->lpVtbl->_NewEnum(This,ppUnkEnum)
#define ITextStoryRanges_Item(This,Index,ppRange) (This)->lpVtbl->Item(This,Index,ppRange)
#define ITextStoryRanges_GetCount(This,pCount) (This)->lpVtbl->GetCount(This,pCount)
#else
/*** IUnknown methods ***/
static inline HRESULT ITextStoryRanges_QueryInterface(ITextStoryRanges* This,REFIID riid,void **ppvObject) {
    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
}
static inline ULONG ITextStoryRanges_AddRef(ITextStoryRanges* This) {
    return This->lpVtbl->AddRef(This);
}
static inline ULONG ITextStoryRanges_Release(ITextStoryRanges* This) {
    return This->lpVtbl->Release(This);
}
/*** IDispatch methods ***/
static inline HRESULT ITextStoryRanges_GetTypeInfoCount(ITextStoryRanges* This,UINT *pctinfo) {
    return This->lpVtbl->GetTypeInfoCount(This,pctinfo);
}
static inline HRESULT ITextStoryRanges_GetTypeInfo(ITextStoryRanges* This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo) {
    return This->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo);
}
static inline HRESULT ITextStoryRanges_GetIDsOfNames(ITextStoryRanges* This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId) {
    return This->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId);
}
static inline HRESULT ITextStoryRanges_Invoke(ITextStoryRanges* This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr) {
    return This->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr);
}
/*** ITextStoryRanges methods ***/
static inline HRESULT ITextStoryRanges__NewEnum(ITextStoryRanges* This,IUnknown **ppUnkEnum) {
    return This->lpVtbl->_NewEnum(This,ppUnkEnum);
}
static inline HRESULT ITextStoryRanges_Item(ITextStoryRanges* This,LONG Index,ITextRange **ppRange) {
    return This->lpVtbl->Item(This,Index,ppRange);
}
static inline HRESULT ITextStoryRanges_GetCount(ITextStoryRanges* This,LONG *pCount) {
    return This->lpVtbl->GetCount(This,pCount);
}
#endif
#endif

#endif


#endif  /* __ITextStoryRanges_INTERFACE_DEFINED__ */

/* Begin additional prototypes for all interfaces */

ULONG           __RPC_USER BSTR_UserSize     (ULONG *, ULONG, BSTR *);
unsigned char * __RPC_USER BSTR_UserMarshal  (ULONG *, unsigned char *, BSTR *);
unsigned char * __RPC_USER BSTR_UserUnmarshal(ULONG *, unsigned char *, BSTR *);
void            __RPC_USER BSTR_UserFree     (ULONG *, BSTR *);
ULONG           __RPC_USER VARIANT_UserSize     (ULONG *, ULONG, VARIANT *);
unsigned char * __RPC_USER VARIANT_UserMarshal  (ULONG *, unsigned char *, VARIANT *);
unsigned char * __RPC_USER VARIANT_UserUnmarshal(ULONG *, unsigned char *, VARIANT *);
void            __RPC_USER VARIANT_UserFree     (ULONG *, VARIANT *);

/* End additional prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __tom_h__ */
