G
Garrold
Hi,
I have a problem trying to add a watermark to a word document. This is
the error I'm getting:
Error 6 The type 'Microsoft.Office.Core.MsoTriState' is defined in an
assembly that is not referenced. You must add a reference to assembly
'office, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c'.
I have the following using statements:
using Word = Microsoft.Office.Interop.Word;
using Microsoft.Office.Core;
And I've added the reference to the Microsoft Office 11.0 Object
library, which gives me the Microsoft.Office.Core, Word & VBIDE
references.
Here is a code snippet:
Word.Selection wSelection = WordApp.Application.Selection;
object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Shape wShape;
WordDocument.Sections[1].Range.Select();
WordDocument.ActiveWindow.ActivePane.View.SeekView =
Microsoft.Office.Interop.Word.WdSeekView.wdSeekCurrentPageHeader;
wShape =
wSelection.HeaderFooter.Shapes.AddTextEffect(Microsoft.Office.Core.MsoPresetTextEffect.msoTextEffect1,
"TEST TEST TEST", "Arial", 1, MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse, 0, 0, ref
oMissing);
Has anyone else encountered a problem trying to use the
Microsoft.Office.Core.MsoTriState enumerations?
Thanks
I have a problem trying to add a watermark to a word document. This is
the error I'm getting:
Error 6 The type 'Microsoft.Office.Core.MsoTriState' is defined in an
assembly that is not referenced. You must add a reference to assembly
'office, Version=11.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c'.
I have the following using statements:
using Word = Microsoft.Office.Interop.Word;
using Microsoft.Office.Core;
And I've added the reference to the Microsoft Office 11.0 Object
library, which gives me the Microsoft.Office.Core, Word & VBIDE
references.
Here is a code snippet:
Word.Selection wSelection = WordApp.Application.Selection;
object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Shape wShape;
WordDocument.Sections[1].Range.Select();
WordDocument.ActiveWindow.ActivePane.View.SeekView =
Microsoft.Office.Interop.Word.WdSeekView.wdSeekCurrentPageHeader;
wShape =
wSelection.HeaderFooter.Shapes.AddTextEffect(Microsoft.Office.Core.MsoPresetTextEffect.msoTextEffect1,
"TEST TEST TEST", "Arial", 1, MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse, 0, 0, ref
oMissing);
Has anyone else encountered a problem trying to use the
Microsoft.Office.Core.MsoTriState enumerations?
Thanks