|
-
Jul 12th, 2007, 06:45 PM
#1
Re: Advanced VB/Office Guru™ Word SpellChecker™.NET
Is this on 2005 or 2003? In 2005 the GetObject function is flakey at best.
Edit: I see it is 2005. I may have to update the article for 2005
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Jul 13th, 2007, 11:47 AM
#2
Hyperactive Member
Re: Advanced VB/Office Guru™ Word SpellChecker™.NET
I noticed that in debug mode, this happens 1 out of 3 times, but if I run the program in release mode, this does not happen very often, but it happens.
Right now, what I do is:
when spell checker is launched, I check the process, if WinWord existed, then I ask users save and quit it. Then, in program, I use
' ''If KillMe = True Then
' '' moApp.Visible = False
' ''End If
Code:
Try
moApp.Quit(False, Nothing, Nothing)
Catch ex As Exception
gcLog.LogInfo("WORD Quit Error!")
Finally
moApp = Nothing
End Try
instead of
Code:
If KillMe = True Then
moApp.Visible = False
End If
This way, the spell checker dlg always gets focus and stays at the top when it is called. The cons are:
users have to save & quit word before launch spell checker;
But I do have a question. When the spell checker is launched in the first time, it takes some time, since it needs lauch WORD. In the program I quit WORD. SO, I think when I launch spell checker in the second (or later) time (without quiting the program which launch spell checker), it SHOULD take some time too since it will launch WORD again. However, I found in the second time, it is very fast, just like WORD is launched already although I can't see the process WinWord.
Actually, fast is good, just feel weird. Maybe it has certain relation with the OS? I guess, 
bear
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|