how to rectify this error

Posted by Santosh4u under C# on 10/3/2013 | Points: 10 | Views : 2291 | Status : [Member] | Replies : 5
Hello All,

i am trying to open the content of a word file in run time using c# code but i am getting below error.

"could not open macro storage".

any one please help me to rectify this error or is it possible to provide me the code to skip the document while getting this error.

refer this below code.

using Microsoft.Office.Interop.Word;
Microsoft.Office.Interop.Word.Document docs;
Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.ApplicationClass();
docs = word.Documents.Open("F:\\Projects\\Resumes\\" + "santosh.doc");

Note: need to be refer(Microsoft.Office.Interop.Word)

Thanks
Santosh




Responses

Posted by: Bandi on: 10/3/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
refer
http://bytes.com/topic/c-sharp/answers/577216-opening-word-document-app

http://social.msdn.microsoft.com/Forums/vstudio/en-US/6ea97f7c-e689-4e46-842c-69d252f44c4b/interopword-error-could-not-open-macro-storage-in-published-wcf-service-method


Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 10/3/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
http://forums.asp.net/t/1060493.aspx

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santosh4u on: 10/4/2013 [Member] Bronze | Points: 25

Up
0
Down
Hi
i have already referred this link and not getting any valuable idea to rectify this issue ..if you could any other solution for this issue then please let me know.

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 10/4/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
These two links provide you the reasons why you got that error
https://casecomplete.zendesk.com/entries/20585402-Could-not-open-macro-storage
http://support.microsoft.com/kb/257757

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 10/4/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer these links for opening Word file
http://stackoverflow.com/questions/16253215/open-and-modify-word-document
http://www.dotnetperls.com/word

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Santosh4u, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response