Microsoft Office Questions? Ask a IT Expert for Support ASAP
VBSSet xl = CreateObject("Excel.application")
xl.Application.Workbooks.Open "C:\sentimenttemplates\test.xlsm"xl.Application.Visible = Truexl.Application.run "'c:\sentimenttemplates\test.xlsm'!macro1"'xl.Quit
Set xl = Nothing
I have found my macros run ok via auto_exec, but not with the VBS-batch that we developed. This macro1 is my first test which doesn't run. Then, I have another test file, that will pass send keys to use the PDFMAKER addin which is the real macro I want to run. I read that addins are not opened with the object method that we use in the vbs and have some test code for this, but am not sure how to implement. I would like help w/ both these issues, but want to start small with macro1.
macro1 is not located in the autoexec. It is a stand alone. It just doesn't run properly. Can you run this vbs/bat with text.xlsm to see if it runs for you. It sees to disable.
Wait, the macro we are looking at is Macrotest, not the macro1.
Look at that one
Did you actually run it to verify?
The other piece to my question is that I my macro will be using an addin (PDFMaker) . and it said something about addins need to be opened via the vbs code as a step after the Create Object so I needed you to help me with this additional code.
This looks like my add-in C:\Program Files (x86)\Adobe\Acrobat 11.0\PDFMaker\Office\PDFMOfficeAddin.dll
Interesting. What version of Excel and Windows are you running this on? Sounds like the first part should work. I wonder why it doesn't.. I've been running this over and over with no luck.
In the Addin name, do you think I would put "C:\Program Files (x86)\Adobe\Acrobat 11.0\PDFMaker\Office\PDFMOfficeAddin.dll" in that? Also, have you heard of an addin ending in dll. This is what I saw when I looked in Excel on the PDFMaker addin.
Hum, that is the versions of both that I have. Is there anyway that you can connect to my machine so you can see.
I am using the exact code we worked on.
I did a google on PDFMaker.xla which does exists. Maybe that could be the one?