• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Illegal operation error while running a application with MS Word.

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
morye
Asked:
morye
  • 3
  • 2
1 Solution
 
lacamsCommented:
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
 
moryeAuthor Commented:
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
 
lacamsCommented:
Have you try with "Set wrdApp = CreateObject("Word.Application.9")" ?

chris
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
moryeAuthor Commented:
yes...but it still not work.
0
 
moryeAuthor Commented:
I fixed the problem after I reinstall the Window.

Thank you for all of the suggestions.
0
 
PashaModCommented:
PAQed, with points refunded (200)

PashaMod
Community Support Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now