C#操作WORD设置底纹无效解决思路

C#操作WORD设置底纹无效if (doc.Application.Selection.Font.Shading.Texture Word.WdTextureIndex.wdT

C#操作WORD设置底纹无效
if (doc.Application.Selection.Font.Shading.Texture == Word.WdTextureIndex.wdTextureNone)
  {
  doc.Application.Selection.Font.Shading.Texture = Word.WdTextureIndex.wdTexture20Percent;
  doc.Application.Selection.Font.Shading.ForegroundPatternColor = Word.WdColor.wdColorBlack;
  doc.Application.Selection.Font.Shading.BackgroundPatternColor = Word.WdColor.wdColorWhite;
  }
  else
  {
  doc.Application.Selection.Font.Shading.Texture = Word.WdTextureIndex.wdTextureNone;
  }
  doc.Application.Selection.Range.Text += "感言:\n";
录制的VBA,设置底纹无效

[解决办法]
不设