is anyone using the interop library for converting doc to docx ..ur input much needed
Please reply
30 Replies
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, and what you expect the result to be. Upload code here https://paste.mod.gg/ (see $code for more information on how to paste your code)
Please post code as well as explain a lot more about the issue you are facing
And please do not ask if someone uses X, but rather ask the question directly. That way nobody has to say "yes" to actually help.
I used interop library for converting .doc file to .docx file but on server it's not working IIS not Supporting interop library..in local it's working fine
Interop library needs a local installation of Microsoft Office
I guess your IIS server doesnt have one
No i already installed ms office
on your server ?
I think IIS Not capable of opening the Ms aaplication
It is
Yes
Is it wanted, i dont know
Do you have an exception ? Could you elaborate on "not working" ?
Wait 1min I'll peste here
At 11/22/2023 5:47:48 PM Word Exception: at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType) at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType) at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj) at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at Icodex.ConfirmPlus.DoctoDocx.Program.ConvertDocToDocx(String directoryPath) in D:\SourceCode\IBeyoud\ConfirmPlus\eAssistantApplication\eAssistantApplication\EAsistant.UserServices\Icodex.ConfirmPlus.DoctoDocx\Program.cs:line 76
I posted exception
Is there a message associated with it ? You posted the stack trace
No i capture stack trace only
Anyway if you dont find any solution, i'd advise to look at Open XML SDK.
It offers the capabilities to manipulate .docx files with no installation of Microsoft Office needed
I really think something is wrong with your installation on your server
Try to capture message also if possible
Can we convert doc file to docx file in open xml
My task is to convert .doc to .docx file
Na indeed you can't
My bad
try to capture the message exception, it is hard to tell without it
Ok can have any suggestions for converting .doc to docx
Other tool or library
i'm looking
I'd try this package.
Most of third library solutions are not free, but this one is free and looks good
Are you on .NET framework or .NET core btw ?
.net framework
Thanks I'll try this let's see
Its only my point of view, but If i were you i'd go to the bottom of the first exception before trying this
Gl !
How many documents?
Unlimited or a pool of some number of documents? It might be cheaper to do by hand.
Unlimited
ExceptionRetrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).dfghj at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType) at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType) at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj) at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Activator.CreateInstance(Type type) at Doc.Controllers.DocController.UploadFile() in C:\Users\Hello\source\repos\Doc\Doc\Controllers\DocController.cs:line 45
Hii i posted exception here
Hi, does the application runs with administrator privileges ?
It looks like the user account used to run the IIS application doesnt have the permission to open word application
It has..I have given
try this "Start > Run > dcomcnfg (or “mmc -32″ and then add the Component Services snap-in manually if you can’t find the app under step 3)
Navigate to Component Services > Computers > My Computer > DCOM Config
Locate the MS application giving you trouble (eg: “Microsoft Excel Application” for Excel or “Microsoft Word 97 – 2003 Document” for Word)
Right click > Properties
On the security tab: Select Customize under Launch and Activation Permissions and click Edit…
Add the account under which the site is running (eg: Network Service) and assign Local Launch & Local Activation permissions
Voila!"
https://www.codeproject.com/Questions/274286/microsoft-office-interop-error
anyway looking on google with your error message you have a few page you can rely on
Thanks u si much
you managed to make it work ?