VBA in Excel to launch Google Earth stopped working - vba

For about 6 months I have had a functional excel spreadsheet that when clicking a button ran a VBA script that created a properly formatted kml file from the lat/long information in the spreadsheet, saved the kml document, and launched Google Earth to view the plotted coordinates.
I successfully used this on June 6th. However, today I am getting this error
"License information for this component not found. You do not have an
appropriate license to use this functionality in the design
environment"
The KML file is still created and saved, but GE will no longer launch.
I have tried this Microsoft fix, but it didn't resolve the problem.
https://support.microsoft.com/en-us/kb/181854/en-us
Below is the part of the VBA that launches Google Earth. The "GEPlugin Type Library" reference is still checked in Microsoft Visual Basic for Applications :
Dim appGoogleEarth As EARTHLib.ApplicationGE
Set appGoogleEarth = New EARTHLib.ApplicationGE
Call appGoogleEarth.OpenKmlFile(OutputFile, 1)
Any help or insight into why this suddenly became a problem and how to fix it is greatly appreciated.

Google Earth Pro don't provide a library like the old version of GE. Then come back to the old version if you want use your XLS spreadsheet.

Related

Convert Excel to PDF in SSIS Not Working

I have SSIS code that converts Excel to PDF in a script task similar to this posts code: Code to Convert Excel to PDF using VB.NET. The SSIS job runs all the way to where it exports to excel:
oWorkbook.ExportAsFixedFormat(pFormatType, PDFFileName, pQuality, _
pIncludeDocProperties, _
pIgnorePrintAreas, _
pFrom, pTo, pOpenAfterPublish)
Once it hits this block of code my SSIS job freezes. I have my application.displayalerts set to false thinking that somethiing pops up but that is not the problem. I also have PDF reader installed on my server and that doesn't help either. This code works on my PC but not on the server. I cannot seem to figure out why this is happening. It seems like the code referenced in the link does work also. Any ideas why my code doesn't work on my server?
You can't reliably call desktop applications from a server process that has no desktop.
It's probably missing something like Acrobat or a print queue and is waiting for user input that will never come.
If you need to reliably create PDFs from excel using an automated process, you'll need to look at 3rd party tools or writing something.
I can't locate it right now, but Microsoft has a technote somewhere that mentions this.
So I dug a bit deeper. I was able to run SQL Agent in interactive mode and I could see a pop up stuck in Excel (or at least see a pop up with a title "printer setup", the screen was all wigged out otherwise). I googled that and found this other posting: Excel automation: PDF export causes "Printer setup" popup that describes my problem. He fixed his problem, which worked for me as well, by changing the default printer to the microsoft XPS document printer. Hope this helps someone else.

Microsoft Access - Missing Reference to acrobat.tlb

I am working with a Microsoft Access database that was mostly completed in Access 2010, and now I am opening it on a new computer that has Access 2013.
Upon opening the program, it tells me,
"Microsoft Access database or project contains a missing or broken reference to the file 'acrobat.tlb' version 1.1."
I have done some research, and I know that I need to go into the VB code and go under tools->references. Now under here it lists the working references then says,
"MISSING: Adobe Acrobat 10.0 Type Library"
So now I understand, that I need to give it the reference to that .tlb file. I am good up to here, but whenever I try to browse I can never find this file. I just downloaded Adobe, so I know I have the most recent version.
I saw a couple places in my research that you can just uncheck the box and try compiling again. This however does not work for me. it needs this reference for several things I am doing.
Has anyone ever had this problem or have any guidance for me?
Thank you!
I'm not 100% on this, but loading Adobe by itself may not give you the library you are looking for. You could need the file which is located in the SDK (which happens to be free) adobe site. Try installing this, and see if you can navigate to the tlb.
SQL hound was right. To expand on what he suggested and be more specific for this issue for those with this problem in the future, you need to download the Acrobat DC SDK (not the air one). In InterappCommunicationSupport/Headers you will find acrobat.tlb.
I am using Access 2013 and Acrobat Pro version 11.0.
I have looked for the file "acrobat.tlb" on my drives.
Found it under: "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat"
In the Visual Basic Code "tools/references", I clicked "Browse" and went to the location I have found, selected the file and clicked OK.
Returning back to "tools/references", the "Adobe Acrobat 10.0 Type Library" is now available and selected.
I have run minimal code to open and show the number of pages of the opened "pdf" document and it returned the proper number of pages.
Just so you know:
I now remember that there was a selection called only "acrobat", it is now gone. Must have been caused by selecting manually the desired file.
Maybe that selection was pointing to the "acrobat.tlb" file.
You can see the full path and name of the file corresponding to the selected library name at the bottom of the reference window.
I had the same problem but I had a Missing reference to "...Adobe 9...Type Library..." I unchecked that and tryed with, "Acrobat Access 3.0 Type Library" futher down. Then it worked.

How do I use Excel to insert blocks into AutoCAD drawings?

I'm trying to use Excel to create AutoCAD drawings. I have a list of product numbers and I'd like to use VBA so that upon hitting a button it will find a block or a drawing file of every product on the list and paste them into an AutoCAD drawing (to a specific point would be a bonus).
So far I've found code that will read from two columns in Excel and will plot a polyline in ACAD using those columns as coordinates. It's very simple but not exactly what I want. Does anyone have suggestions or example code that does something similar? I've found some online using the "ThisDrawing." object but Excel isn't recognizing that so I've reached a stand still. I have all day tomorrow to work on it, so I'll be doing a lot more searching, but any help is definitely appreciated. Thank you
Autodesk provide free downloads on their website so that you can add the VBA IDE into AutoCAD.
Then, inside the AutoCAD IDE you start a new VBA project.
Add a reference to your Excel library so that you can read the Excel spreadsheet.
You need to look up on:
ThisDrawing.ModelSpace.InsertBlock
In the AutoCAD VBA manual. It tells you what various parameters. But they are straightforward - origin, scale, rotation, path to block.
When you call the InsertBlock routine it will create a AcadBlockReference object. You can do any further customization on that object.

Macro fails in Word 2013

I have a Word macro that has been working fine for ages. I have recently upgraded to Word 2013 and the behavior has changed.
It occurs on the following line:
Doc.SaveAs Path + "Manual\" + TitleString + ".htm", wdFormatFilteredHTML
which builds a valid file path and name and saves the current document as an HTML page.
Under Word 2013, the macro opens a file save dialog box with no filename and with the default file extension (.docx) instead of (.htm), as if the filtered HTML mode was no more available.
I have tried with named arguments, and also with the new SaveAs2 method, but saw no change.
How can I solve this ?
I fond this comment on the DataZX.CN forum:"I Had the same problem. I'm running a windows 8/64bits on an ACER laptop. SOLUTION : remove the Add-in "Icloud Acer ...".
I happen to use Acer desktop, and there was indeed this Icloud add-in pre-installed in Word. After disabling it, the macro works !!!!!!!!!!!!!!!
Thanks StackOverflow for pointing me in the right direction as always...
and thanks Yves for spreading the info...
I removed Acer cloud plugin from Word and excel just to be on safe side.
Blame foolish manufacturers like Acer for another bundled piece of crap software that causes more harm than good.
Quoted from MSDN forum post...
http://social.msdn.microsoft.com/Forums/office/en-US/59c0da80-a7e6-4026-855c-f6b9fbf9c386/word-2013-vba-documentsaveas-dialog-appears-even-applicationclassdisplayalerts-?forum=worddev
...From all you tell me, my feeling is that there may be another third-party application (or a virus) mixing in - that the display of SaveAs is not coming from your application.
This is difficult for you to test, since whatever it is is probably loading with Word...

MS project 2010 save gannt chart as pdf in to single page

I created a gannt chart using MS Project 2010 and I wanted it to be saved as a PDF file. But it gives me the chart as 4 parts in 4 pages which makes it unreadable. There are no flexible options in save as pdf. Did I miss something?
I found a way to do that on MS-Project it self. I simply used a printer driver software ("pdf995" >> http://www.pdf995.com/) and it allowed me to do adjustments to save the pdf by giving the options it gives when printing the document.
It saved my whole effort.
There are two pieces of software, either Onepager Pro or Milestone Professional, that will allow you to do this (a new, consolidated Gantt chart;) it's not easy to do in Project by itself.