Solved

Illegal operation error while running a application with MS Word.

Posted on 2003-11-06
6
248 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
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

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
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…
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…

730 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