Results 1 to 3 of 3

Thread: Microsoft Word Object - Is it Thread Safe?

  1. #1

    Thread Starter
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Microsoft Word Object - Is it Thread Safe?

    1.) My first question is, Is the MSWord Object Thread Safe? (We are looking to create a DLL that generates word documents on a server and it could be called n number of times, by any number of different processes)

    2.) If the answer to #1 is no (which is my current assumption), does anyone know of any components (COM or .NET) that can create Word and PDF documents that is thread safe?

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Microsoft Word Object - Is it Thread Safe?

    As far as I can see, every time you create a Word App object through Interop (which may be what you are talking about), there is a new instance created. I say this because I have been able to pack the system process list with instances of WINWORD during debug when the code to clean up the object failed to run. It looks like every instance of an App object is a separate instance of Word. However, initialization is far faster after the first time, so there must be some overlap, perhaps in DLL's.
    My usual boring signature: Nothing

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Microsoft Word Object - Is it Thread Safe?

    Negative0, since this sounds like a server app your making you may want to check out MS Visual Studio Tools for Office 2003.
    It allows you to create dlls for use with Excel and Word. If Word's not thread safe, it should be when used in VSTO.
    Maybe after reading up on it you could get your company to purchase it/
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width