Solved

Illegal operation error while running a application with MS Word.

Posted on 2003-11-06
6
246 Views
Last Modified: 2013-12-28
In my VB program, it contains a function to export a data to MS Word.

I had install the VB program to several computers. But, only one computer have this error appear. The computer is use Win 2000 and Office 2000.

"This program has performed an illegal operation and will be shut down."

It said is the problem with kernel32.dll and seems to be is a window problem.
it was because the program is work fine at before. It just appear this error few days ago.


How can I solve this problem??

Please help~~
Thank you
0
Comment
Question by:morye
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:lacams
ID: 9737629
What is the function that you use ?
Have you created a Word Object ?
What is the os type and Office version where this vb works fine ?

chris
0
 

Author Comment

by:morye
ID: 9760738
The function is....

Public wrdApp      As Word.Application
Public wrdDoc      As Word.Document
Public wrdSelection    As Word.Selection

public functiob ExportWord()

    Set wrdApp = CreateObject("Word.Application")
    wrdApp.Visible = True
   
    ' Add a new document
    Set wrdDoc = wrdApp.Documents.Add
... ...

The error was appear at the statement wrdApp.Documents.Add
The OS is Win 2000 and Office 2000.

All the computers (at the before) is the same setting.
But, all computers have use for a period.
I don't know how the user use it.

He maybe install or remove some porgrams himself. It makes some setting files changed......etc.

Thank You.
0
 
LVL 1

Expert Comment

by:lacams
ID: 9762058
Have you try with "Set wrdApp = CreateObject("Word.Application.9")" ?

chris
0
Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

 

Author Comment

by:morye
ID: 10250908
yes...but it still not work.
0
 

Author Comment

by:morye
ID: 10380181
I fixed the problem after I reinstall the Window.

Thank you for all of the suggestions.
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 10382987
PAQed, with points refunded (200)

PashaMod
Community Support Moderator
0

Featured Post

Do email signature updates give you a headache?

Constantly trying to correctly format email signatures? Spending all of your time at every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Several part series to implement Internet Explorer 11 Enterprise Mode
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now