morye
asked on
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
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
ASKER
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.Applica tion")
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.
Public wrdApp As Word.Application
Public wrdDoc As Word.Document
Public wrdSelection As Word.Selection
public functiob ExportWord()
Set wrdApp = CreateObject("Word.Applica
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.
Have you try with "Set wrdApp = CreateObject("Word.Applica tion.9")" ?
chris
chris
ASKER
yes...but it still not work.
ASKER
I fixed the problem after I reinstall the Window.
Thank you for all of the suggestions.
Thank you for all of the suggestions.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you created a Word Object ?
What is the os type and Office version where this vb works fine ?
chris