Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Word Automation Export toWord Problems

0 views
Skip to first unread message

Shane

unread,
Nov 19, 2009, 1:53:02 PM11/19/09
to
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...

Mark Rae [MVP]

unread,
Nov 19, 2009, 2:42:38 PM11/19/09
to
"Shane" <Sh...@discussions.microsoft.com> wrote in message
news:E1C2B875-104D-41B9...@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 new messages