0
실례합니다. 단어 표의 표 모양을 지정된 셀에 삽입하는 방법은 무엇입니까? 다음 코드는 작동하지 않습니다. 두 모양은 첫 번째 셀에서만 사용할 수 있습니다.C# 표 셀에 지정된 셀에 도형을 삽입하는 단어
Range oCell1 = newTable.Cell(1, 1).Range;
float top1 = oWord.Selection.get_Information(WdInformation.wdVerticalPositionRelativeToPage);
float left1 = oWord.Selection.get_Information(WdInformation.wdHorizontalPositionRelativeToPage);
newTable.Cell(1, 1).VerticalAlignment = WdCellVerticalAlignment.wdCellAlignVerticalBottom;
newTable.Cell(1, 1).Range.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
Microsoft.Office.Interop.Word.Shape shape1 = oDoc.Shapes.AddShape(shapeId, left1, top1 , oWord.CentimetersToPoints(float.Parse("1.1")), oWord.CentimetersToPoints(float.Parse("0.5")), oCell1);
Range oCell2 = newTable.Cell(1, 3).Range;
float top2 = oWord.Selection.get_Information(WdInformation.wdVerticalPositionRelativeToPage);
float left2 = oWord.Selection.get_Information(WdInformation.wdHorizontalPositionRelativeToPage);
Microsoft.Office.Interop.Word.Shape shape2 = oDoc.Shapes.AddShape(shapeId, left2, top2 , oWord.CentimetersToPoints(float.Parse("1.1")), oWord.CentimetersToPoints(float.Parse("0.5")), oCell2);