0

I have programmed a number of Access/VBA applications using the OpenObject/CreateObject methods to link to Excel Spreadsheets or Word Documents and transfer data etc.

Now these are not working and returning the error:

Error 70 - Permission Denied.

From research it seems that this is due to some security updates from Microsoft which deactivated the CreateObject("Scriptlet.TypeLib") option.

I saw Microsoft's recommended workaround with the CoCreateGUID but I have not found an explanation of how one should apply this to still create or open an Excel spreadsheet etc.

Do you have some sample code, beyond what was proposed by Microsoft (i.e. Type and Function declarations and code for the CreateGUIDString Function)?

I need to know how to call this functions within my code to link to Excel or other Office applications.

braX
  • 11,506
  • 5
  • 20
  • 33
  • Why not add an explicit reference to Excel/Word ? – Siyon DP May 06 '19 at 14:05
  • @Siyon DP How do I do that? – Ronald Attard Pullicino May 06 '19 at 15:44
  • Possible duplicate of [MS Access VBA Error: Run time error '70' Permission Denied](https://stackoverflow.com/questions/45332357/ms-access-vba-error-run-time-error-70-permission-denied) – June7 May 06 '19 at 17:04
  • Have a look at this answer. https://stackoverflow.com/a/14494847/4839827 – Ryan Wildry May 06 '19 at 17:38
  • June7 & @Ryan Wildry Thanks. I had seen those and I have implemented the CoCreateGUID function code in my application. However I have not found anywhere how to use this to then open or create an Excel file (or word, etc...) I mean its fine to be able to create a unique identified but how do I then link it to an external object? I feel like I am missing something simple which maybe is obvious but I cannot see it. – Ronald Attard Pullicino May 07 '19 at 07:25

0 Answers0