Hi ,
I am using word Automation to export to word .
I am getting a exception like
ex.message gives :- Command only available in print layout view.
ex.stacktrace gives :- at Word.View.set_SeekView(WdSeekView prop)
My code is I am trying to add a Image to Header ...
oWord.ActiveWindow.ActivePane.View.SeekView =
WdSeekView.wdSeekCurrentPageHeader;
logoCustom = oWord.Selection.HeaderFooter.Shapes.AddPicture(logoPath,
logoCustom.Select(
logoCustom.Name =
logoCustom.Left = (
String logoPath = GetImgPath();ref oFalse, ref oTrue, ref oMissing, ref
oMissing, ref oMissing, ref oMissing, ref oMissing);ref
oMissing);"CustomLogo";float)WdShapePosition.wdShapeLeft;
//SETTING FOCUES BACK TO DOCUMENT
oWord.ActiveWindow.ActivePane.View.SeekView =
WdSeekView.wdSeekMainDocument;
Can you please help me out...
I am using word 2003 and windows server 2003
Can you please help me out...
|
|
0
|
|
|
|
Reply
|
Utf
|
11/19/2009 6:53:02 PM |
|
"Shane" <Shane@discussions.microsoft.com> wrote in message
news:E1C2B875-104D-41B9-8E91-C4728973961E@microsoft.com...
> I am using Word Automation to export to Word .
> Can you please help me out...
Server-side Office automation is not recommended, and not supported, by
Microsoft because Office simply wasn't designed to be used in that way:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2 - note
specifically the paragraph in bold...
If you need to create true Word documents in an ASP.NET solution, you need
this:
http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
|
|
0
|
|
|
|
Reply
|
Mark
|
11/19/2009 7:42:38 PM
|
|