Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


dsjere
2012-01-13T08:14:55Z
Hi.

I've got an issue with the task Office Macro.
I'm using Visualcron 6.0.5 build 19326 on a Win 2008 r2 64-bit server with Office 2010.

When I run a very simple Excel macro I get the following error message:


System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Excel cannot access the file 'C:\VCOffice\Bardolino.xlsm'. There are several possible reasons:

The file name or path does not exist.
The file is being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.
--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at TaskOfficeMacro.Main.RunExcelMacro()
Exception in Task: Non zero exit code
Exception in Task: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Excel cannot access the file 'C:\VCOffice\Bardolino.xlsm'. There are several possible reasons:

The file name or path does not exist.
The file is being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.
--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at TaskOfficeMacro.Main.RunExcelMacro()
Exception in Task: Non zero exit code.

The user that is running the task has got the proper rights to the folder that contains the macro and is local administrator. I suspect that it is some security setting in win 2008 or in office 2010. But I can't find it.
Is there anyone that could point me in the right direction?
Sponsor
Forum information
Support
2012-01-13T08:25:02Z
Is it possible to send the document along with screenshots of your Macro settings to support@visualcron.com?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2012-01-13T09:11:06Z
I think this is the solution - it is a workaround for a bug in Windows:

1. Create directory "C:\Windows\SysWOW64\config\systemprofile\Desktop " (for 64 bit Windows) or "C:\Windows\System32\config\systemprofile\Desktop " (for 32 bit Windows)
2. Set Full control permissions for directory Desktop (for user "SYSTEM")

Please do this for both 32 and 64 bit folder.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-13T09:46:12Z
Thank's a lot, you're a star!

Now it works just fine.

Support
2012-01-13T09:47:20Z
Originally Posted by: dsjere 

Thank's a lot, you're a star!

Now it works just fine.



Great, thanks for testing out!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-16T08:15:59Z
Hello again.

I had hoped that this would solve a similar problem I have with Access Macros. But it didn't. The error message I get when I try to run one of those is:


System.Runtime.InteropServices.COMException (0x800A09D5): Microsoft Access cannot find the procedure 'Macro1.'
at Microsoft.Office.Interop.Access.ApplicationClass.Run(String Procedure, Object& Arg1, Object& Arg2, Object& Arg3, Object& Arg4, Object& Arg5, Object& Arg6, Object& Arg7, Object& Arg8, Object& Arg9, Object& Arg10, Object& Arg11, Object& Arg12, Object& Arg13, Object& Arg14, Object& Arg15, Object& Arg16, Object& Arg17, Object& Arg18, Object& Arg19, Object& Arg20, Object& Arg21, Object& Arg22, Object& Arg23, Object& Arg24, Object& Arg25, Object& Arg26, Object& Arg27, Object& Arg28, Object& Arg29, Object& Arg30)
at TaskOfficeMacro.Main.RunAccessMacro() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code
Exception in Task: System.Runtime.InteropServices.COMException (0x800A09D5): Microsoft Access cannot find the procedure 'Macro1.'
at Microsoft.Office.Interop.Access.ApplicationClass.Run(String Procedure, Object& Arg1, Object& Arg2, Object& Arg3, Object& Arg4, Object& Arg5, Object& Arg6, Object& Arg7, Object& Arg8, Object& Arg9, Object& Arg10, Object& Arg11, Object& Arg12, Object& Arg13, Object& Arg14, Object& Arg15, Object& Arg16, Object& Arg17, Object& Arg18, Object& Arg19, Object& Arg20, Object& Arg21, Object& Arg22, Object& Arg23, Object& Arg24, Object& Arg25, Object& Arg26, Object& Arg27, Object& Arg28, Object& Arg29, Object& Arg30)
at TaskOfficeMacro.Main.RunAccessMacro() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code.

Is it possible that you have a solution for that to?

Best regards.
Support
2012-01-16T10:42:30Z
1. Do you have Office installed on that machine?
2. what architecture of Office is it (32 or 64 bit)?
3. what architecture of Windows is it (32 or 64 bit)?

Originally Posted by: dsjere 

Hello again.

I had hoped that this would solve a similar problem I have with Access Macros. But it didn't. The error message I get when I try to run one of those is:


System.Runtime.InteropServices.COMException (0x800A09D5): Microsoft Access cannot find the procedure 'Macro1.'
at Microsoft.Office.Interop.Access.ApplicationClass.Run(String Procedure, Object& Arg1, Object& Arg2, Object& Arg3, Object& Arg4, Object& Arg5, Object& Arg6, Object& Arg7, Object& Arg8, Object& Arg9, Object& Arg10, Object& Arg11, Object& Arg12, Object& Arg13, Object& Arg14, Object& Arg15, Object& Arg16, Object& Arg17, Object& Arg18, Object& Arg19, Object& Arg20, Object& Arg21, Object& Arg22, Object& Arg23, Object& Arg24, Object& Arg25, Object& Arg26, Object& Arg27, Object& Arg28, Object& Arg29, Object& Arg30)
at TaskOfficeMacro.Main.RunAccessMacro() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code
Exception in Task: System.Runtime.InteropServices.COMException (0x800A09D5): Microsoft Access cannot find the procedure 'Macro1.'
at Microsoft.Office.Interop.Access.ApplicationClass.Run(String Procedure, Object& Arg1, Object& Arg2, Object& Arg3, Object& Arg4, Object& Arg5, Object& Arg6, Object& Arg7, Object& Arg8, Object& Arg9, Object& Arg10, Object& Arg11, Object& Arg12, Object& Arg13, Object& Arg14, Object& Arg15, Object& Arg16, Object& Arg17, Object& Arg18, Object& Arg19, Object& Arg20, Object& Arg21, Object& Arg22, Object& Arg23, Object& Arg24, Object& Arg25, Object& Arg26, Object& Arg27, Object& Arg28, Object& Arg29, Object& Arg30)
at TaskOfficeMacro.Main.RunAccessMacro() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code.

Is it possible that you have a solution for that to?

Best regards.



Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-16T12:05:43Z
Yes, we have Office 2010 64bit on windows 2008 R2 64bit on that machine.
Support
2012-01-16T14:24:50Z
Could you please test this attached version and see if it works better.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-16T15:16:36Z
I installed the new version on a test machine Wich is running on Win 7 32 bit.
I got the error below. Is it supposed to be working on win7 32 bit or do you want me to install it on the 2008 R2 64 bit-server?

I suspect I don't have to translate the error code. If I do let me know.



Ohanterat undantag: System.TypeInitializationException: Ett undantagsfel uppstod f”r typinitieraren f”r TaskOfficeMacro.Main. ---> System.IO.FileLoadException: Det g†r inte att l„sa in filen eller sammans„ttningen VisualCronAPI, Version=1.0.3.19326, Culture=neutral, PublicKeyToken=55f7a52402de1c04 eller ett av dess beroenden. Den p†tr„ffade sammans„ttningens manifestdefinition matchar inte sammans„ttningsreferensen. (Undantag fr†n HRESULT: 0x80131040)
Filnamn: VisualCronAPI, Version=1.0.3.19326, Culture=neutral, PublicKeyToken=55f7a52402de1c04
vid TaskOfficeMacro.Main..cctor()

VARN: Loggningen av sammans„ttningsbindningen „r inaktiverad.
Du kan aktivera felloggning f”r sammans„ttningsbindningar genom att ange registerv„rdet [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) till 1.
Obs! Prestanda kan f”rs„mras n†got med felloggning f”r sammans„ttningsbindningar.
Du kan inaktivera funktionen genom att ta bort registerv„rdet [HKLM\Software\Microsoft\Fusion!EnableLog].

--- Slut p† stacksp†rning f”r interna undantag ---
vid TaskOfficeMacro.Main.Main(String[] args)
Exception in Task: Non zero exit code
Exception in Task:
Ohanterat undantag: System.TypeInitializationException: Ett undantagsfel uppstod f”r typinitieraren f”r TaskOfficeMacro.Main. ---> System.IO.FileLoadException: Det g†r inte att l„sa in filen eller sammans„ttningen VisualCronAPI, Version=1.0.3.19326, Culture=neutral, PublicKeyToken=55f7a52402de1c04 eller ett av dess beroenden. Den p†tr„ffade sammans„ttningens manifestdefinition matchar inte sammans„ttningsreferensen. (Undantag fr†n HRESULT: 0x80131040)
Filnamn: VisualCronAPI, Version=1.0.3.19326, Culture=neutral, PublicKeyToken=55f7a52402de1c04
vid TaskOfficeMacro.Main..cctor()

VARN: Loggningen av sammans„ttningsbindningen „r inaktiverad.
Du kan aktivera felloggning f”r sammans„ttningsbindningar genom att ange registerv„rdet [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) till 1.
Obs! Prestanda kan f”rs„mras n†got med

Support
2012-01-16T15:20:05Z
Thanks, please try again with the download. New file.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-16T15:34:41Z
I got the same error on the 2008 server.

Unhandled Exception: System.TypeInitializationException: The type initializer for 'TaskOfficeMacro.Main' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'VisualCronAPI, Version=1.0.3.19326, Culture=neutral, PublicKeyToken=55f7a52402de1c04' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'VisualCronAPI, Version=1.0.3.19326, Culture=neutral, PublicKeyToken=55f7a52402de1c04'
at TaskOfficeMacro.Main..cctor()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

--- End of inner exception stack trace ---
at TaskOfficeMacro.Main.Main(String[] args) Exception in Task: Non zero exit code Exception in Task:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'TaskOfficeMacro.Main' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'VisualCronAPI, Version=1.0.3.19326, Culture=neutral, PublicKeyToken=55f7a52402de1c04' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'VisualCronAPI, Version=1.0.3.19326, Culture=neutral, PublicKeyToken=55f7a52402de1c04'
at TaskOfficeMacro.Main..cctor()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

--- E
dsjere
2012-01-16T15:38:57Z
Was there supposed to be an attached new file in your post #11?
Support
2012-01-16T15:42:56Z
Hi,

you never tried the new download - you used the old file. Please try the new download.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2012-01-16T15:45:33Z
Originally Posted by: dsjere 

Was there supposed to be an attached new file in your post #11?



Use the one from post #9
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-16T15:56:19Z
Ok. I had to uninstall VC to be able to install the new VisualCron6.0.7-mainframe.

It is now installed on my Win 7 32 bit with Office 2010.

Now I got the folowing:

System.Runtime.InteropServices.COMException (0x800A0997): Uttrycket har en ogiltig h„nvisning till egenskapen Visible.
vid Microsoft.Office.Interop.Access.ApplicationClass.set_Visible(Boolean pfVisible)
vid TaskOfficeMacro.Main.RunAccessMacro() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code
Exception in Task: System.Runtime.InteropServices.COMException (0x800A0997): Uttrycket har en ogiltig h„nvisning till egenskapen Visible.
vid Microsoft.Office.Interop.Access.ApplicationClass.set_Visible(Boolean pfVisible)
vid TaskOfficeMacro.Main.RunAccessMacro() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code
Support
2012-01-16T16:55:58Z
Do you get the same error for Windows 2008? This build was especially built for x64 systems.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-16T17:11:27Z
No, it didn't work on the 2008 r2 64bit either. I can still run the macro manually, but not from Visualcron. This time I got the errormessage below:


System.Runtime.InteropServices.COMException (0x800A09D5): Microsoft Access cannot find the procedure 'Macro1.'
at Microsoft.Office.Interop.Access.ApplicationClass.Run(String Procedure, Object& Arg1, Object& Arg2, Object& Arg3, Object& Arg4, Object& Arg5, Object& Arg6, Object& Arg7, Object& Arg8, Object& Arg9, Object& Arg10, Object& Arg11, Object& Arg12, Object& Arg13, Object& Arg14, Object& Arg15, Object& Arg16, Object& Arg17, Object& Arg18, Object& Arg19, Object& Arg20, Object& Arg21, Object& Arg22, Object& Arg23, Object& Arg24, Object& Arg25, Object& Arg26, Object& Arg27, Object& Arg28, Object& Arg29, Object& Arg30)
at TaskOfficeMacro.Main.RunAccessMacro() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code
Exception in Task: System.Runtime.InteropServices.COMException (0x800A09D5): Microsoft Access cannot find the procedure 'Macro1.'
at Microsoft.Office.Interop.Access.ApplicationClass.Run(String Procedure, Object& Arg1, Object& Arg2, Object& Arg3, Object& Arg4, Object& Arg5, Object& Arg6, Object& Arg7, Object& Arg8, Object& Arg9, Object& Arg10, Object& Arg11, Object& Arg12, Object& Arg13, Object& Arg14, Object& Arg15, Object& Arg16, Object& Arg17, Object& Arg18, Object& Arg19, Object& Arg20, Object& Arg21, Object& Arg22, Object& Arg23, Object& Arg24, Object& Arg25, Object& Arg26, Object& Arg27, Object& Arg28, Object& Arg29, Object& Arg30)
at TaskOfficeMacro.Main.RunAccessMacro() - maybe Microsoft Office is not installed? This Task requires Microsoft Office being installed.
Exception in Task: Non zero exit code
Support
2012-01-16T22:26:42Z
Strange. We are currently testing on Windows 7 x64 with x64 Office 2010. Could you please send the macro you are testing to support@visualcron.com?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2012-01-17T14:30:19Z
After some tests we have come to that executing macros on Access is a problem. We have tried different architecture and various code on the Internet. None works. It always results in the same error. That the procedure is not found.

For access we are putting this temporarily on hold to see if we can get more feedback.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-18T08:02:29Z
Ok, I understand.

My customer is in need of this function.
Whats the plan for solving the problem, can I expect a solution in the near future?

Is it possible to get information on the progress in this matter?


Best regards.
Support
2012-01-18T08:26:22Z
Originally Posted by: dsjere 

Ok, I understand.

My customer is in need of this function.
Whats the plan for solving the problem, can I expect a solution in the near future?

Is it possible to get information on the progress in this matter?


Best regards.



We will start a side project on this to investigate and notify you when we have more information. We will start this side project on Monday.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-18T09:07:04Z
Support
2012-01-21T10:59:05Z
Please test this version:

http://www.visualcron.co....aspx?g=posts&t=2225 

The quit will error out because it is not exiting properly but hopefully it works with your other macro.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
dsjere
2012-01-24T14:54:42Z
Hi Henrik.

I'm happy to say that it seems to be working.

Thank you very much for your efforts.

Approximatly when can I expect version 6.0.7 to be properly released?
Scroll to Top