Solved

Illegal operation error while running a application with MS Word.

Posted on 2003-11-06
6
245 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For a variety of reasons, it sometimes makes sense to reboot a Windows-based computer on a regular, perhaps daily basis. This "cures" a lot of ills by resetting processes, flushing caches, refreshing memory, and reestablish network connections. In a…
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

744 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

11 Experts available now in Live!

Get 1:1 Help Now