G
Garrold
Hi,
I'm having a problem calling the AddTextEffect method of the
Selection.HeaderFooter.Shapes.
I'm getting this error when trying to call the method:
cannot convert from 'Microsoft.Office.Core.MsoTriState
[####\obj\Debug\Interop.Microsoft.Office.Core.dll]' to
'Microsoft.Office.Core.MsoTriState []'
where "####" is equal to the absolute path of the project.
Here is my latest attempt at getting around this problem:
Word.Selection wSelection = WordDocument.Application.Selection;
object oMissing = System.Reflection.Missing.Value;
Word.Shape wShape;
WordDocument.Sections[1].Range.Select();
Office.MsoTriState _msoFalse =
Microsoft.Office.Core.MsoTriState.msoFalse;
Office.MsoPresetTextEffect _msoTextEffect =
Microsoft.Office.Core.MsoPresetTextEffect.msoTextEffect1;
WordDocument.ActiveWindow.ActivePane.View.SeekView =
Microsoft.Office.Interop.Word.WdSeekView.wdSeekCurrentPageHeader;
wShape =
wSelection.HeaderFooter.Shapes.AddTextEffect(_msoTextEffect, "TEST TEST
TEST", "Arial", 1, _msoFalse, _msoFalse, 0, 0, ref oMissing);
I have added the MS Office 11.0 com object to my references and
included the using Microsoft.Office.Core statement, any help would be
much appreciated!
Thanks
Gaz
I'm having a problem calling the AddTextEffect method of the
Selection.HeaderFooter.Shapes.
I'm getting this error when trying to call the method:
cannot convert from 'Microsoft.Office.Core.MsoTriState
[####\obj\Debug\Interop.Microsoft.Office.Core.dll]' to
'Microsoft.Office.Core.MsoTriState []'
where "####" is equal to the absolute path of the project.
Here is my latest attempt at getting around this problem:
Word.Selection wSelection = WordDocument.Application.Selection;
object oMissing = System.Reflection.Missing.Value;
Word.Shape wShape;
WordDocument.Sections[1].Range.Select();
Office.MsoTriState _msoFalse =
Microsoft.Office.Core.MsoTriState.msoFalse;
Office.MsoPresetTextEffect _msoTextEffect =
Microsoft.Office.Core.MsoPresetTextEffect.msoTextEffect1;
WordDocument.ActiveWindow.ActivePane.View.SeekView =
Microsoft.Office.Interop.Word.WdSeekView.wdSeekCurrentPageHeader;
wShape =
wSelection.HeaderFooter.Shapes.AddTextEffect(_msoTextEffect, "TEST TEST
TEST", "Arial", 1, _msoFalse, _msoFalse, 0, 0, ref oMissing);
I have added the MS Office 11.0 com object to my references and
included the using Microsoft.Office.Core statement, any help would be
much appreciated!
Thanks
Gaz