Solved

Illegal operation error while running a application with MS Word.

Posted on 2003-11-06
6
249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

726 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