Range rng( m_wordDoc.Range(&vtMissing, &vtMissing) ); 
_Font font; 
Shapes shps; 
Shape shp; 
COleVariant vtRng, vtSafeArrayofPoints; 
COleSafeArray safeArrayofPoints; 
float fPoints[10][2]; 
SAFEARRAY safeArray; 
SAFEARRAYBOUND aDim[1];  fPoints[0][0] = 10; 
fPoints[0][1] = 10; 
fPoints[1][0] = 15; 
fPoints[1][1] = 15; 
fPoints[2][0] = 20; 
fPoints[2][1] = 20; 
fPoints[3][0] = 25; 
fPoints[3][1] = 25; 
fPoints[4][0] = 30; 
fPoints[4][1] = 30; 
fPoints[5][0] = 35; 
fPoints[5][1] = 35; 
fPoints[6][0] = 40; 
fPoints[6][1] = 40; 
fPoints[7][0] = 45; 
fPoints[7][1] = 45; 
fPoints[8][0] = 50; 
fPoints[8][1] = 50; 
fPoints[9][0] = 55; 
fPoints[9][1] = 55; V_VT(&vtRng) = VT_DISPATCH; 
V_DISPATCH(&vtRng) = rng; 
V_DISPATCH(&vtRng)- >AddRef(); DWORD elements[2] = {10, 2}; 
long indices[2]; safeArrayofPoints.Create(VT_R4, 2, elements); for (int i=0; i <10; i++) 

indices[0] = i; 
for (int j=0; j <2; j++) 

indices[1] = j; 
safeArrayofPoints.PutElement(indices, &fPoints[i][j]); 

} shps.AttachDispatch( m_wordDoc.GetShapes() ); 
shps.AddCurve(safeArrayofPoints, &vtMissing);上面的代码在执行到shps.AddCurve(safeArrayofPoints, &vtMissing)语句时,出现异常,报告越界错误。哪位高手
可以帮帮我啊,急用,谢谢啦!!!!