Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

64bit Excel Office 2010: Automation error %1 is not a valid Win32 application.

visual basic 4 / 5 / 6

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1 Jerdzzz


    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 18 November 2012 - 10:35 PM

This function works on Microsoft Office 32bit. But when transferring to 64bit, the error "Automation error %1 is not a valid Win32 application" occured.

Private Function CreateUsingManifest(nameOfClass As String) As Object
Dim actCtx As Object

Set actCtx = CreateObject("Microsoft.Windows.ActCtx")

On Error GoTo InvalidManifest
Set CreateUsingManifest = actCtx.CreateObject(nameOfClass) 'Error here

Set actCtx = Nothing
On Error GoTo 0
Exit Function

.Raise "Automation error %1 is not a valid Win32 application."
End Function

#2 Orjan


    CC Mentor

  • Moderator
  • 2918 posts

Posted 18 November 2012 - 11:45 PM

seems like Microsoft.Windows.ActCtx is the problem here. Correct spelled?

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.

#3 BlackRabbit


    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 19 November 2012 - 07:44 AM

There is a couple of things to be considered:

1- did you check for the library to be present?
2- did you try to import it into your project?
3- are your O.S and .NET framework installed in 64 bit version? cause they will not interact ( 32bits with 64 bits ) in runtime from .NET unless you do ... Assembly synchronization

#4 Jerdzzz


    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 19 November 2012 - 05:53 PM

I'm using a 64bit OS right now. I installed here first my 32bit MS Office and it was working fine. Then I uninstalled it and replaced it with a 64bit MS Office and this error "Automation error %1 is not a valid Win32 application." pops up.

#5 WingedPanther73


    A spammer's worst nightmare

  • Moderator
  • 17757 posts

Posted 20 November 2012 - 06:45 AM

Sounds like you have a 32bit application trying to interact/launch a 64bit application. That does NOT work well, as seen by your error message. I'm guessing you're compling your VB app as 32bit.

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download