C
C#7mo ago
kailash T.

is anyone using the interop library for converting doc to docx ..ur input much needed

Please reply
30 Replies
Buddy
Buddy7mo ago
$details
MODiX
MODiX7mo ago
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)
Buddy
Buddy7mo ago
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.
kailash T.
kailash T.7mo ago
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
Prae
Prae7mo ago
Interop library needs a local installation of Microsoft Office I guess your IIS server doesnt have one
kailash T.
kailash T.7mo ago
No i already installed ms office
Prae
Prae7mo ago
on your server ?
kailash T.
kailash T.7mo ago
I think IIS Not capable of opening the Ms aaplication
Prae
Prae7mo ago
It is
kailash T.
kailash T.7mo ago
Yes
Prae
Prae7mo ago
Is it wanted, i dont know Do you have an exception ? Could you elaborate on "not working" ?
kailash T.
kailash T.7mo ago
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
Prae
Prae7mo ago
Is there a message associated with it ? You posted the stack trace
kailash T.
kailash T.7mo ago
No i capture stack trace only
Prae
Prae7mo ago
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
kailash T.
kailash T.7mo ago
Can we convert doc file to docx file in open xml My task is to convert .doc to .docx file
Prae
Prae7mo ago
Na indeed you can't My bad try to capture the message exception, it is hard to tell without it
kailash T.
kailash T.7mo ago
Ok can have any suggestions for converting .doc to docx Other tool or library
Prae
Prae7mo ago
i'm looking
Prae
Prae7mo ago
I'd try this package. Most of third library solutions are not free, but this one is free and looks good
No description
Prae
Prae7mo ago
Are you on .NET framework or .NET core btw ?
kailash T.
kailash T.7mo ago
.net framework Thanks I'll try this let's see
Prae
Prae7mo ago
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 !
Mayor McCheese
Mayor McCheese7mo ago
How many documents? Unlimited or a pool of some number of documents? It might be cheaper to do by hand.
kailash T.
kailash T.7mo ago
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
Prae
Prae7mo ago
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
kailash T.
kailash T.7mo ago
It has..I have given
Prae
Prae7mo ago
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
kailash T.
kailash T.7mo ago
Thanks u si much
Prae
Prae7mo ago
you managed to make it work ?