0
すみません、指定されたセルに単語のヘッダーテーブルのシェイプを挿入する方法はありますか? 次のコードは機能しません。2つの図形は最初のセルにしか配置できません。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);