Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB5 CreateObject("Word.Basic") Doesn't Work for me

Posted on 1998-05-06
5
Medium Priority
?
602 Views
Last Modified: 2013-11-25
I'm creating an OLE interface with Word97 and I when I set an Object = CreateObject("Word.Basic") I get a compiler error
             "Run time Error 429 " 
             "Active X component can't create object"
I've referenced the Microsoft Office Library. What am I doing wrong?

Thanks in advance for your help.
0
Comment
Question by:WDB
[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
5 Comments
 
LVL 1

Expert Comment

by:chualk
ID: 1442520
Try this :

Sub command1_click()

Dim xlApp As Object
   
Set xlApp = CreateObject("word.basic")

xlApp.AppShow



Remember to set xlapp = nothing after you do not need the object.

Regards,
Chualk
0
 
LVL 2

Author Comment

by:WDB
ID: 1442521
Thanks for your response chualk's.

That's how I had it before and I still get the error. I'm referencing the Word 8.0 Object library as well as the VB Visual Basic for Applications extensibility.
0
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 200 total points
ID: 1442522
WDB,

Your statement is OK, but you have a problem with DCOM settings, take a look at the following artical it might help you out.

PSS ID Number: Q177394

The following is a list of possible causes of Run-time error 429. It is by no means a complete or definitive list.
 
Problem with Server Run Location
--------------------------------
 
This scenario applies to Microsoft Windows NT and Microsoft Windows 95 servers.
 
1. On the Server machine run the DCOM Config utility (Dcomcnfg.exe).
 
2. Select the DCOM Server from the Applications tab and choose the Properties button.
 
3. Select the Location tab.
 
4. Ensure the  Run application on this computer  setting is checked.
 
Incorrect Server Specified in Client Registry
---------------------------------------------
 
On the client machine, use the following steps to verify that the DCOM Server machine is properly delegated. This scenario applies to Windows NT and Windows 95 clients.
 
1. On the client machine run the DCOM Config utility (Dcomcnfg.exe).
 
2. Select the DCOM Server from the Applications tab and choose properties.
 
3. On the General tab be sure that there is an entry for  Remote Computer and that the remote computer name is correct.
 
4. If the computer name is incorrect, select the Location tab.
 
5. Ensure the  Run application on the following computer setting is checked. In the dialog box beneath this selection, type in the correct computer name for your DCOM Server.
 
You may also use the following steps to verify the remote computer name by using the Windows Registry.
 
1. Run RegEdit.exe.
 
2. The remote server name is specified in the following registry key:
 
      HKEY_CLASSES_ROOT\
         APPID\
            {The CLSID of the DCOM Server}\
               RemoteServerName
 
Enable Remote Connections is Disabled
-------------------------------------
 
On Windows 95 servers only, you must be sure remote connections are enabled in order for a remote application to access and execute a serving application. The following steps can be used to perform this task.
 
1. Run DCOM Config (Dcomcnfg.exe).
 
2. Select the Default Security tab.
 
3. Check the  Enable remote connection  check box.
 
- or -
 
1. Run RegEdit.exe.
 
2. Locate the following registry key:
 
      HKEY_LOCAL_MACHINE\
         Software\
            Microsoft\
               OLE\
                  EnableRemoteConnect
 
3. Ensure the EnableRemoteConnect value is set to  Y  for Yes.
 
Remote Component not Started
----------------------------
 
On Windows 95 servers only, the DCOM Server application must be started before a remote client may access it. DCOM Server applications on Windows NT Servers do not have this limitation.
 
Binary Compatibility is Broken
------------------------------
 
1. Open the DCOM Server project.
 
2. From the Project menu, choose the project Properties.
 
3. On the Component tab ensure  Binary Compatibility  is selected.
 
If  Binary Compatibility  is not set, a new GUID (a.k.a ClassID) is not created each time the DCOM Server project is compiled. If you do not recompile the Client application after a new GUID is assigned, the DCOM clients will break.
 
Use the following steps to resolve this issue:
 
1. Set the DCOM Server project to  Binary Compatibility.
 
2. Recompile both the Server and Client application.
 
In the future, if you make any interface changes to your DCOM Server which may break compatibility, the Visual Basic compiler warns you that the component is no longer binary compatible. If you proceed to compile the DCOM Server, thus breaking compatibility, you must recompile any client applications which refer to that server. For more information about compatibility see the References section below.
 

Best regards
Bin Huwairib
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1442523
It's strange that chualk's code didn't work for you, it worked on my machine.

Perhaps you have a bod install of Word (or VB?).


0
 

Expert Comment

by:r_aparajit
ID: 1442524
Instead of "Word.Basic" ,You just try "Word.Application" & 
give a reference to Word 8.0 Object library in reference dialog box.
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

636 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