Discussion:
HRESULT E_FAIL Exception!
(too old to reply)
idreesbutt
2010-01-19 22:07:30 UTC
Permalink
Hi,

I am trying to generate a powerpoint presentation in C#. It works well on my
local machine which is running XP. When I run the application on Windows
Server 2003 (our Server) the presentation gives HRESULT E_FAIL when I call
the following code


chart = (Microsoft.Office.Interop.Graph.Chart)slide.Shapes.AddOLEObject
(GetLeft(i), GetTop(i), GetWidth(i), GetHeight(i), "MSGraph.Chart", "",
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "", Microsoft.Office.Core.
MsoTriState.msoFalse).OLEFormat.Object;


I have no idea what goes wrong with it on the Server. The PPT is generated
perfectly with all other data (tables, text) shown perfectly! Please help! I
have uninstalled and reinstalled Standard Office 2007 many times now. Ran
Registry cleaner as well. Did alot of google! this is really frustrating!


Please help!
Paul Shapiro
2010-01-20 17:38:33 UTC
Permalink
Once the PPT has been created on a working machine, can you view it
correctly on the server? If the chart does not appear, perhaps the required
features are not installed or registered correctly.
Post by idreesbutt
I am trying to generate a powerpoint presentation in C#. It works well on my
local machine which is running XP. When I run the application on Windows
Server 2003 (our Server) the presentation gives HRESULT E_FAIL when I call
the following code
chart = (Microsoft.Office.Interop.Graph.Chart)slide.Shapes.AddOLEObject
(GetLeft(i), GetTop(i), GetWidth(i), GetHeight(i), "MSGraph.Chart", "",
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "",
Microsoft.Office.Core.
MsoTriState.msoFalse).OLEFormat.Object;
I have no idea what goes wrong with it on the Server. The PPT is generated
perfectly with all other data (tables, text) shown perfectly! Please help! I
have uninstalled and reinstalled Standard Office 2007 many times now. Ran
Registry cleaner as well. Did alot of google! this is really frustrating!
idreesbutt via DotNetMonster.com
2010-01-21 21:16:46 UTC
Permalink
Thank you so much for replying and taking interest in my problem!

The PPT does get generated on the server and viewed! All the slides (tabular
+ textual) are generated very well! but for the chart slides, I get this
exception. However, on my local machine the same code works well!

Your opinion seems to be valid but I wonder how I can check what is missing
and how I can reset everything? I mean I have reinstalled office many times
with every possible combination of steps that made sense to me but nothing
has worked so far! Can you guide me further? Please!
Post by Paul Shapiro
Once the PPT has been created on a working machine, can you view it
correctly on the server? If the chart does not appear, perhaps the required
features are not installed or registered correctly.
Post by idreesbutt
I am trying to generate a powerpoint presentation in C#. It works well on my
[quoted text clipped - 13 lines]
Post by idreesbutt
have uninstalled and reinstalled Standard Office 2007 many times now. Ran
Registry cleaner as well. Did alot of google! this is really frustrating!
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/vs-net-office/201001/1
Paul Shapiro
2010-01-22 02:22:11 UTC
Permalink
I don't think you answered the question- if you take the ppt file that was
generated 100% complete on the workstation, and the charts are visible on
the workstation, to the server, can you see the charts on the server? If
not, the charting component is probably not installed on the server. If yes,
then something is perhaps wrong with the chart component installation on the
server. Is the chart component supported on a server? Is the server being
used as a workstation, with a single logged-on user, or is it a web server
supporting multiple users? Microsoft Office software is specifically not
licensed or supported for use on a web server, and won't work correctly in
that application.

Anyway, it seems that whatever charting component you're using is registered
on the workstation but not on the server. What charting component are you
using?
Post by idreesbutt via DotNetMonster.com
Thank you so much for replying and taking interest in my problem!
The PPT does get generated on the server and viewed! All the slides (tabular
+ textual) are generated very well! but for the chart slides, I get this
exception. However, on my local machine the same code works well!
Your opinion seems to be valid but I wonder how I can check what is missing
and how I can reset everything? I mean I have reinstalled office many times
with every possible combination of steps that made sense to me but nothing
has worked so far! Can you guide me further? Please!
Post by Paul Shapiro
Once the PPT has been created on a working machine, can you view it
correctly on the server? If the chart does not appear, perhaps the required
features are not installed or registered correctly.
Post by idreesbutt
I am trying to generate a powerpoint presentation in C#. It works well
on
my
[quoted text clipped - 13 lines]
Post by idreesbutt
have uninstalled and reinstalled Standard Office 2007 many times now. Ran
Registry cleaner as well. Did alot of google! this is really
frustrating!
idreesbutt via DotNetMonster.com
2010-01-22 16:08:47 UTC
Permalink
I apologize if there was any confusion.

Actually, once a file is generated successfully on my computer, it does
appear ok everywhere, on the server as well on my local machines. Also, if I
manually create a presentation on server using the same Office (standard
edition), I can create charts and so on. The only issue that I have is when
the deployed code runs on server, it somehow does not recognize the
AddOleObject method. I am using Microsoft Graph for charting (Graph.Chart to
be specific).

Lets say that something is wrong with the installation. Whats the way to fix
it? Cant I just reset everything? I dont think Windows Server 2003 has any
issue with this. To check this however, I am going to run an experiment by
having a fresh local machine with Windows Server 2003 installed on it and
then creating the same environment to see whether the application generates
the charts or not!

There are multiple websites hosted on our server so to answer you question, I
think the answer is that its not being used for a single user!

Please dont get irritated by this but you are the only one responding on my
issue and I look forward to receiving your help in fixing this issue thank
you...
Post by Paul Shapiro
I don't think you answered the question- if you take the ppt file that was
generated 100% complete on the workstation, and the charts are visible on
the workstation, to the server, can you see the charts on the server? If
not, the charting component is probably not installed on the server. If yes,
then something is perhaps wrong with the chart component installation on the
server. Is the chart component supported on a server? Is the server being
used as a workstation, with a single logged-on user, or is it a web server
supporting multiple users? Microsoft Office software is specifically not
licensed or supported for use on a web server, and won't work correctly in
that application.
Anyway, it seems that whatever charting component you're using is registered
on the workstation but not on the server. What charting component are you
using?
Post by idreesbutt via DotNetMonster.com
Thank you so much for replying and taking interest in my problem!
[quoted text clipped - 23 lines]
Post by idreesbutt via DotNetMonster.com
Post by idreesbutt
Registry cleaner as well. Did alot of google! this is really frustrating!
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/vs-net-office/201001/1
unknown
2010-03-25 12:03:41 UTC
Permalink
Hey.. i had this same issue my code is working fine for windowsxp,windows7... but not for windows vista... any small sugg.. is well appreciated.... i am testing under 2010 office...



idreesbutt wrote:

HRESULT E_FAIL Exception!
19-Jan-10

Hi

I am trying to generate a powerpoint presentation in C#. It works well on m
local machine which is running XP. When I run the application on Window
Server 2003 (our Server) the presentation gives HRESULT E_FAIL when I cal
the following cod

chart = (Microsoft.Office.Interop.Graph.Chart)slide.Shapes.AddOLEObjec
(GetLeft(i), GetTop(i), GetWidth(i), GetHeight(i), "MSGraph.Chart", ""
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "", Microsoft.Office.Core
MsoTriState.msoFalse).OLEFormat.Object

I have no idea what goes wrong with it on the Server. The PPT is generate
perfectly with all other data (tables, text) shown perfectly! Please help!
have uninstalled and reinstalled Standard Office 2007 many times now. Ra
Registry cleaner as well. Did alot of google! this is really frustrating

Please help!

Previous Posts In This Thread:

On Tuesday, January 19, 2010 5:07 PM
idreesbutt wrote:

HRESULT E_FAIL Exception!
Hi

I am trying to generate a powerpoint presentation in C#. It works well on m
local machine which is running XP. When I run the application on Window
Server 2003 (our Server) the presentation gives HRESULT E_FAIL when I cal
the following cod

chart = (Microsoft.Office.Interop.Graph.Chart)slide.Shapes.AddOLEObjec
(GetLeft(i), GetTop(i), GetWidth(i), GetHeight(i), "MSGraph.Chart", ""
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "", Microsoft.Office.Core
MsoTriState.msoFalse).OLEFormat.Object

I have no idea what goes wrong with it on the Server. The PPT is generate
perfectly with all other data (tables, text) shown perfectly! Please help!
have uninstalled and reinstalled Standard Office 2007 many times now. Ra
Registry cleaner as well. Did alot of google! this is really frustrating

Please help!

On Wednesday, January 20, 2010 12:38 PM
Paul Shapiro wrote:

Once the PPT has been created on a working machine, can you view itcorrectly
Once the PPT has been created on a working machine, can you view i
correctly on the server? If the chart does not appear, perhaps the require
features are not installed or registered correctly.

On Thursday, January 21, 2010 4:16 PM
idreesbutt via DotNetMonster.com wrote:

Thank you so much for replying and taking interest in my problem!
Thank you so much for replying and taking interest in my problem

The PPT does get generated on the server and viewed! All the slides (tabula
+ textual) are generated very well! but for the chart slides, I get thi
exception. However, on my local machine the same code works well

Your opinion seems to be valid but I wonder how I can check what is missin
and how I can reset everything? I mean I have reinstalled office many time
with every possible combination of steps that made sense to me but nothin
has worked so far! Can you guide me further? Please

Paul Shapiro wrote

-
Message posted via DotNetMonster.co
http://www.dotnetmonster.com/Uwe/Forums.aspx/vs-net-office/201001/1

On Thursday, January 21, 2010 9:22 PM
Paul Shapiro wrote:

I do not think you answered the question- if you take the ppt file that
I do not think you answered the question- if you take the ppt file that wa
generated 100% complete on the workstation, and the charts are visible o
the workstation, to the server, can you see the charts on the server? I
not, the charting component is probably not installed on the server. If yes
then something is perhaps wrong with the chart component installation on th
server. Is the chart component supported on a server? Is the server bein
used as a workstation, with a single logged-on user, or is it a web serve
supporting multiple users? Microsoft Office software is specifically no
licensed or supported for use on a web server, and will not work correctly i
that application

Anyway, it seems that whatever charting component you are using is registere
on the workstation but not on the server. What charting component are you
using?

On Friday, January 22, 2010 11:08 AM
idreesbutt via DotNetMonster.com wrote:

I apologize if there was any confusion.
I apologize if there was any confusion.

Actually, once a file is generated successfully on my computer, it does
appear ok everywhere, on the server as well on my local machines. Also, if I
manually create a presentation on server using the same Office (standard
edition), I can create charts and so on. The only issue that I have is when
the deployed code runs on server, it somehow does not recognize the
AddOleObject method. I am using Microsoft Graph for charting (Graph.Chart to
be specific).

Lets say that something is wrong with the installation. Whats the way to fix
it? Cant I just reset everything? I dont think Windows Server 2003 has any
issue with this. To check this however, I am going to run an experiment by
having a fresh local machine with Windows Server 2003 installed on it and
then creating the same environment to see whether the application generates
the charts or not!

There are multiple websites hosted on our server so to answer you question, I
think the answer is that its not being used for a single user!

Please dont get irritated by this but you are the only one responding on my
issue and I look forward to receiving your help in fixing this issue thank
you...

Paul Shapiro wrote:

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/vs-net-office/201001/1

On Thursday, March 25, 2010 8:00 AM
swathi wrote:

stuck with the same issue
Hey i had this same issue my code working fine for windowsxp,windows 7 but not working for vista.... any small help is well appreciated... its killing

On Thursday, March 25, 2010 8:03 AM
swathi wrote:

i had this same issue
Hey.. i had this same issue my code is working fine for windowsxp,windows7... but not for windows vista... any small sugg.. is well appreciated.... i am testing under 2010 office...


Submitted via EggHeadCafe - Software Developer Portal of Choice
SharePoint Video Library Template Available For Download
http://www.eggheadcafe.com/tutorials/aspnet/223c6e57-f81f-44b3-ab05-5995f2b0ab63/sharepoint-video-library.aspx
unknown
2010-03-25 12:03:11 UTC
Permalink
Hey.. i had this same issue my code is working fine for windowsxp,windows7... but not for windows vista... any small sugg.. is well appreciated.... i am testing under 2010 office...



idreesbutt wrote:

HRESULT E_FAIL Exception!
19-Jan-10

Hi

I am trying to generate a powerpoint presentation in C#. It works well on m
local machine which is running XP. When I run the application on Window
Server 2003 (our Server) the presentation gives HRESULT E_FAIL when I cal
the following cod

chart = (Microsoft.Office.Interop.Graph.Chart)slide.Shapes.AddOLEObjec
(GetLeft(i), GetTop(i), GetWidth(i), GetHeight(i), "MSGraph.Chart", ""
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "", Microsoft.Office.Core
MsoTriState.msoFalse).OLEFormat.Object

I have no idea what goes wrong with it on the Server. The PPT is generate
perfectly with all other data (tables, text) shown perfectly! Please help!
have uninstalled and reinstalled Standard Office 2007 many times now. Ra
Registry cleaner as well. Did alot of google! this is really frustrating

Please help!

Previous Posts In This Thread:

On Tuesday, January 19, 2010 5:07 PM
idreesbutt wrote:

HRESULT E_FAIL Exception!
Hi

I am trying to generate a powerpoint presentation in C#. It works well on m
local machine which is running XP. When I run the application on Window
Server 2003 (our Server) the presentation gives HRESULT E_FAIL when I cal
the following cod

chart = (Microsoft.Office.Interop.Graph.Chart)slide.Shapes.AddOLEObjec
(GetLeft(i), GetTop(i), GetWidth(i), GetHeight(i), "MSGraph.Chart", ""
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "", Microsoft.Office.Core
MsoTriState.msoFalse).OLEFormat.Object

I have no idea what goes wrong with it on the Server. The PPT is generate
perfectly with all other data (tables, text) shown perfectly! Please help!
have uninstalled and reinstalled Standard Office 2007 many times now. Ra
Registry cleaner as well. Did alot of google! this is really frustrating

Please help!

On Wednesday, January 20, 2010 12:38 PM
Paul Shapiro wrote:

Once the PPT has been created on a working machine, can you view itcorrectly
Once the PPT has been created on a working machine, can you view i
correctly on the server? If the chart does not appear, perhaps the require
features are not installed or registered correctly.

On Thursday, January 21, 2010 4:16 PM
idreesbutt via DotNetMonster.com wrote:

Thank you so much for replying and taking interest in my problem!
Thank you so much for replying and taking interest in my problem

The PPT does get generated on the server and viewed! All the slides (tabula
+ textual) are generated very well! but for the chart slides, I get thi
exception. However, on my local machine the same code works well

Your opinion seems to be valid but I wonder how I can check what is missin
and how I can reset everything? I mean I have reinstalled office many time
with every possible combination of steps that made sense to me but nothin
has worked so far! Can you guide me further? Please

Paul Shapiro wrote

-
Message posted via DotNetMonster.co
http://www.dotnetmonster.com/Uwe/Forums.aspx/vs-net-office/201001/1

On Thursday, January 21, 2010 9:22 PM
Paul Shapiro wrote:

I do not think you answered the question- if you take the ppt file that
I do not think you answered the question- if you take the ppt file that wa
generated 100% complete on the workstation, and the charts are visible o
the workstation, to the server, can you see the charts on the server? I
not, the charting component is probably not installed on the server. If yes
then something is perhaps wrong with the chart component installation on th
server. Is the chart component supported on a server? Is the server bein
used as a workstation, with a single logged-on user, or is it a web serve
supporting multiple users? Microsoft Office software is specifically no
licensed or supported for use on a web server, and will not work correctly i
that application

Anyway, it seems that whatever charting component you are using is registere
on the workstation but not on the server. What charting component are you
using?

On Friday, January 22, 2010 11:08 AM
idreesbutt via DotNetMonster.com wrote:

I apologize if there was any confusion.
I apologize if there was any confusion.

Actually, once a file is generated successfully on my computer, it does
appear ok everywhere, on the server as well on my local machines. Also, if I
manually create a presentation on server using the same Office (standard
edition), I can create charts and so on. The only issue that I have is when
the deployed code runs on server, it somehow does not recognize the
AddOleObject method. I am using Microsoft Graph for charting (Graph.Chart to
be specific).

Lets say that something is wrong with the installation. Whats the way to fix
it? Cant I just reset everything? I dont think Windows Server 2003 has any
issue with this. To check this however, I am going to run an experiment by
having a fresh local machine with Windows Server 2003 installed on it and
then creating the same environment to see whether the application generates
the charts or not!

There are multiple websites hosted on our server so to answer you question, I
think the answer is that its not being used for a single user!

Please dont get irritated by this but you are the only one responding on my
issue and I look forward to receiving your help in fixing this issue thank
you...

Paul Shapiro wrote:

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/vs-net-office/201001/1

On Thursday, March 25, 2010 8:00 AM
swathi wrote:

stuck with the same issue
Hey i had this same issue my code working fine for windowsxp,windows 7 but not working for vista.... any small help is well appreciated... its killing


Submitted via EggHeadCafe - Software Developer Portal of Choice
BizTalk Configure and Send SMTP Mail Based on Message Within an Orchestration
http://www.eggheadcafe.com/tutorials/aspnet/4e9e7c92-1279-4fdb-8631-a2f309a021c2/biztalk-configure-and-sen.aspx
unknown
2010-03-25 12:00:44 UTC
Permalink
Hey i had this same issue my code working fine for windowsxp,windows 7 but not working for vista.... any small help is well appreciated... its killing



idreesbutt wrote:

HRESULT E_FAIL Exception!
19-Jan-10

Hi

I am trying to generate a powerpoint presentation in C#. It works well on m
local machine which is running XP. When I run the application on Window
Server 2003 (our Server) the presentation gives HRESULT E_FAIL when I cal
the following cod

chart = (Microsoft.Office.Interop.Graph.Chart)slide.Shapes.AddOLEObjec
(GetLeft(i), GetTop(i), GetWidth(i), GetHeight(i), "MSGraph.Chart", ""
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "", Microsoft.Office.Core
MsoTriState.msoFalse).OLEFormat.Object

I have no idea what goes wrong with it on the Server. The PPT is generate
perfectly with all other data (tables, text) shown perfectly! Please help!
have uninstalled and reinstalled Standard Office 2007 many times now. Ra
Registry cleaner as well. Did alot of google! this is really frustrating

Please help!

Previous Posts In This Thread:

On Tuesday, January 19, 2010 5:07 PM
idreesbutt wrote:

HRESULT E_FAIL Exception!
Hi

I am trying to generate a powerpoint presentation in C#. It works well on m
local machine which is running XP. When I run the application on Window
Server 2003 (our Server) the presentation gives HRESULT E_FAIL when I cal
the following cod

chart = (Microsoft.Office.Interop.Graph.Chart)slide.Shapes.AddOLEObjec
(GetLeft(i), GetTop(i), GetWidth(i), GetHeight(i), "MSGraph.Chart", ""
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "", Microsoft.Office.Core
MsoTriState.msoFalse).OLEFormat.Object

I have no idea what goes wrong with it on the Server. The PPT is generate
perfectly with all other data (tables, text) shown perfectly! Please help!
have uninstalled and reinstalled Standard Office 2007 many times now. Ra
Registry cleaner as well. Did alot of google! this is really frustrating

Please help!

On Wednesday, January 20, 2010 12:38 PM
Paul Shapiro wrote:

Once the PPT has been created on a working machine, can you view itcorrectly
Once the PPT has been created on a working machine, can you view i
correctly on the server? If the chart does not appear, perhaps the require
features are not installed or registered correctly.

On Thursday, January 21, 2010 4:16 PM
idreesbutt via DotNetMonster.com wrote:

Thank you so much for replying and taking interest in my problem!
Thank you so much for replying and taking interest in my problem

The PPT does get generated on the server and viewed! All the slides (tabula
+ textual) are generated very well! but for the chart slides, I get thi
exception. However, on my local machine the same code works well

Your opinion seems to be valid but I wonder how I can check what is missin
and how I can reset everything? I mean I have reinstalled office many time
with every possible combination of steps that made sense to me but nothin
has worked so far! Can you guide me further? Please

Paul Shapiro wrote

-
Message posted via DotNetMonster.co
http://www.dotnetmonster.com/Uwe/Forums.aspx/vs-net-office/201001/1

On Thursday, January 21, 2010 9:22 PM
Paul Shapiro wrote:

I do not think you answered the question- if you take the ppt file that
I do not think you answered the question- if you take the ppt file that wa
generated 100% complete on the workstation, and the charts are visible o
the workstation, to the server, can you see the charts on the server? I
not, the charting component is probably not installed on the server. If yes
then something is perhaps wrong with the chart component installation on th
server. Is the chart component supported on a server? Is the server bein
used as a workstation, with a single logged-on user, or is it a web serve
supporting multiple users? Microsoft Office software is specifically no
licensed or supported for use on a web server, and will not work correctly i
that application

Anyway, it seems that whatever charting component you are using is registere
on the workstation but not on the server. What charting component are you
using?

On Friday, January 22, 2010 11:08 AM
idreesbutt via DotNetMonster.com wrote:

I apologize if there was any confusion.
I apologize if there was any confusion.

Actually, once a file is generated successfully on my computer, it does
appear ok everywhere, on the server as well on my local machines. Also, if I
manually create a presentation on server using the same Office (standard
edition), I can create charts and so on. The only issue that I have is when
the deployed code runs on server, it somehow does not recognize the
AddOleObject method. I am using Microsoft Graph for charting (Graph.Chart to
be specific).

Lets say that something is wrong with the installation. Whats the way to fix
it? Cant I just reset everything? I dont think Windows Server 2003 has any
issue with this. To check this however, I am going to run an experiment by
having a fresh local machine with Windows Server 2003 installed on it and
then creating the same environment to see whether the application generates
the charts or not!

There are multiple websites hosted on our server so to answer you question, I
think the answer is that its not being used for a single user!

Please dont get irritated by this but you are the only one responding on my
issue and I look forward to receiving your help in fixing this issue thank
you...

Paul Shapiro wrote:

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/vs-net-office/201001/1


Submitted via EggHeadCafe - Software Developer Portal of Choice
BizTalk: Conditional looping incorporating the Greater Than functoid.
http://www.eggheadcafe.com/tutorials/aspnet/e4334816-d106-40f2-812d-043c18df964c/biztalk-conditional-loop.aspx
Loading...