Posts filtered by tags: Christos Samaras[x]


 

Get & Set The Default Windows Printer With VBA

Last updated: 15/07/2018, 2 min read (without the code) Introduction Although VBA is a great language for building Office “applications”, when it comes to handling Windows devices, such as a printer, for example, things start to become difficult. The obvious reason is that the VBA was not designed for this kind of purposes. However, what if your VBA “application” needs to know how many printers are installed and available in the particular computer? What if your “application” must set the... ...
Tags: Office, Seo, Office Tips, VBA, Christos Samaras


Geocoding & Reverse Geocoding Functions In Google Sheets

Last updated: 28/08/2018, 1 min read (without the code) Introduction In the previous post, we learned the basics about developing and using a custom function in Google Sheets. It is time now to switch to something more advanced compared to our first example. We have seen in the past how to use Google’s geocoding services from VBA. Here we will see how to call these services using Google Apps Script (GAS). The main advantage when developing a GAS function is that, unlike VBA, you don’t need to....
Tags: Google, Seo, VBA, Christos Samaras, Google Sheets, Google Apps Script


Triggers & Events In Google Sheets

Last updated: 05/10/2018, 3 min read (without the code) Introduction According to the documentation, triggers let Google Apps Script run a function automatically when a certain event, like opening a document, occurs. Apps Script supports two types of triggers, simple and installable. Simple triggers are a set of reserved functions built into Apps Script, like the function onOpen(e), which is executed when a user opens a Google Docs, Sheets, Slides, or Forms file. Installable triggers, on the.....
Tags: Google, Seo, Christos Samaras, Google Sheets, Google Apps Script


Human Comfort & HVAC System Operation

Introduction The goal of the heating, ventilating, and air conditioning (HVAC) system is to create and maintain a comfortable environment within a building. Depending on geographic location and building construction, various types of interior climate control systems help ensure that interior spaces are maintained at comfortable levels year-round. With today’s energy conservation concerns, buildings are constructed to be much tighter, reducing the level of natural exchange between indoor and... ...
Tags: Articles, Seo, Christos Samaras


Send Multiple Emails From Google Sheets Using GAS

Last updated: 05/01/2019, 3 min read (without the code) Introduction Have you ever wondered how is it possible to send multiple emails to different recipients, without counting on external services, like MailChimp, AWeber, Mailerlite and others? If the answer to this question is yes, then you would probably be surprised to learn that you can achieve this by simply using Google Sheets and some custom code written in Apps Script. In this post, we will assume that you already have the email... ...
Tags: Google, Seo, Christos Samaras, Google Apps Script, MailChimp AWeber Mailerlite


Get Public IP, Local IP & MAC Address Using VBA

Introduction As the title implies, today we will learn how to retrieve the local and the public IP address, as well as the MAC address of a computer using VBA. First of all, the definition of IP address according to Wikipedia is the following: “An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or.....
Tags: Mac, Wikipedia, Seo, Office Tips, Christos Samaras


CodeEval 2 – Mth To The Last Element

About CodeEval post series CodeEval is a series of posts which are different than the typical engineering/Excel/VBA posts that are being published in this blog. The purpose of this series is to demonstrate possible solutions on various CodeEval programming challenges. Each solution has already been submitted and accepted as valid on CodeEval platform, so if you try to submit the presented solution as it is, you will probably get a “not unique solution” result. The solutions will be presented in....
Tags: Seo, Christos Samaras, CodeEval, Excel VBA


Get Image Size In Pixels With VBA

Last updated: 19/02/2018, 2 min read (without the code) Introduction People who are interested in digital photography taking seriously the size of the images that they take. The dimensions of an image – width and height – can be easily spotted in the Windows Explorer. If you hover your mouse over an image file you will see a pop window showing its dimensions. Alternatively, you can right-click on an image file, select properties on the menu that pop-ups and then, in the Properties form, go......
Tags: Seo, Office Tips, VBA, Christos Samaras


Pipe Friction Factor - Online Calculator

Last updated: 15/01/2018, 1 min read (without the tables) Introduction After a long time, I am returning to a subject that has bothered me many times in the past: friction factor. This time, however, I tried to switch my typical tools, so instead of an Excel/VBA solution, you will get a free online tool. The tool calculates the pipe friction factor based on Churchill's equation. If you have read any of my previous posts, you will probably remember that Churchill's equation is valid for the... ...
Tags: Seo, Churchill, Christos Samaras, Freeware Tools


Reverse Geocoding Using VBA & Google API

Last updated: 09/08/2018, 1 min read (without the code) Introduction After updating the existing VBA functions that dealt with Google APIs, it is time to introduce a new function that can be used for Reverse Geocoding, a short definition of which, based on Wikipedia, is the following: “Reverse geocoding is the process of back (reverse) coding of a point location (latitude, longitude) to a readable address or place name. This permits the identification of nearby street addresses, places,... ...
Tags: Google, Wikipedia, Seo, Office Tips, VBA, Christos Samaras


How To Get A Free Google API Key (August 2018 Update)

Last updated: 09/08/2018, 4 min read Introduction During the previous years, I published several VBA functions that used Google web services, such as Geocoding, Elevation, and Directions. These functions worked in the same way: a properly formatted request was sent to the Google server, and, then, a response was received in XML format. If the response was successful, the requested field was retrieved (latitude, longitude, elevation, trip distance etc.) by reading the XML file. These VBA... ...
Tags: Google, Seo, VBA, Christos Samaras, Useful Stuff


Open A Password-Protected PDF File With VBA

Last updated: 03/05/2018, 2 min read (without the code) Introduction In the past, we have seen two ways to open PDF files with VBA: the first one involved the usage of the Adobe Object Model and it could be only used with Adobe Professional. The second one was more generic; it was taking advantage of the Windows API functions and it could be used by both Adobe Reader and Professional. Both ways worked and continue to work just fine. There is a problem, though: what will happen if the PDF file....
Tags: Seo, Office Tips, VBA, Christos Samaras


Get External Hyperlinks From A Web Page

Last updated: 20/05/2018, 1 min read Introduction Some years ago, I published a VBA code that proved to be very popular in blog users: the code and the accompanying workbook could be used for downloading files from the internet. One common request that I get since I published that code, is how to retrieve the hyperlinks from a web page, so as to download the files afterwards. I decided to help all these blog users by creating a workbook that does exactly what they requested. So, the workbook....
Tags: Seo, Christos Samaras, Freeware Tools


Get Laptop's Battery Information Through VBA

Last updated: 03/07/2018, 1 min read (without the code) Introduction As the title indicates, in this post we will learn how to get several properties related to the battery of the laptop that runs our VBA code. Unfortunately, VBA does not have any built-in functionality that can be used to retrieve this kind of information. Therefore, with the help of WMI we will get the following battery properties:AvailabilityBattery statusChemistryEstimated charge remainingEstimated run timeTime on... ...
Tags: Seo, Office Tips, VBA, Christos Samaras


5 Common Inefficiencies That Affect HVAC System’s Efficiency

Introduction This (long) post initiated by the necessity to answer the following question: How much the HVAC system can affect the building’s overall efficiency? Well, the short answer is that for office buildings, the HVAC system contributes about 25 – 30% on the total building energy use! It is more for laboratories, since much more energy is demanded for fume hoods and lab equipment. Moreover, about 25% of an office building’s energy is used for lighting and the balance for plug loads... ...
Tags: Articles, Seo, Christos Samaras


Playing With Photoshop From Excel VBA

Last updated: 06/11/2017, 1 min read (without the code) Introduction Adobe Photoshop is probably the most famous raster graphics editor that is available on the market for almost three decades. You can do amazing things with this software. I have only played with it for a few hours, and I was quite surprised with the results. One of the things that intrigued me the most was the ability to program it. So, in this post I will take the opportunity to show you how to: Resize an image.Modify an... ...
Tags: Seo, Office Tips, Christos Samaras


Automatically Adjust Secondary Y Axis Scale Through VBA

Introduction Some days ago, while I was checking the discussions on an Excel-related group on LinkedIn, I bumped into an interesting question about charts. The question was “how to automatically set the secondary Y axis scale via code, so that both primary and secondary axes share the same number of gridlines”. I thought this question was interesting for two reasons: first, it’s quite common to include a secondary Y axis on a chart, just to display another series that have different scale... ...
Tags: Seo, Office Tips, Christos Samaras


Road Transport Emissions Evolution In Urban Areas; The Case Of Thessaloniki, Greece

About First of all, it seems that in previous months I couldn’t fulfill my own promises regarding this blog. I have an extremely heavy workload the last few months and it seems that until I present my thesis, I will not be able to update this blog regularly. So, dear blog readers please be patient! Anyway, in the paragraphs that follow you will find a text version of my latest poster, which was presented at the 14th International Conference on Environmental Science and Technology. The... ...
Tags: Articles, Seo, THESSALONIKI Greece, Christos Samaras, Road Transport Emissions Evolution In Urban Areas


Creating & Customizing Column Charts In Google Sheets

Last updated: 07/11/2018, 2 min read (without the code) Introduction Google Sheets, much like Microsoft Excel, incorporate many different chart types, which can help the user to visualize his/her data. In this post, we will learn how to create and customize a simple column chart in Google Sheets. There will be the “manual way”, the “coding way” – using Google Apps Script – as well a bonus tip for selecting chart colors. The manual way To create a column chart manually just follow these 2... ...
Tags: Microsoft, Seo, Christos Samaras, Google Sheets, Google Apps Script


CodeEval 3 – Reverse And Add

About CodeEval post series CodeEval is a series of posts which are different than the typical engineering/Excel/VBA posts that are being published in this blog. The purpose of this series is to demonstrate possible solutions to various CodeEval programming challenges. Each solution has already been submitted and accepted as valid on CodeEval platform, so if you try to submit the presented solution as it is, you will probably get a “not unique solution” result. The solutions will be presented in....
Tags: Seo, Christos Samaras, CodeEval, Excel VBA


Get Email Information Into Google Sheets Using GAS

Last updated: 05/01/2019, 1 min read (without the code) Introduction We have already seen how to send emails directly from Google Sheets. In this post, we will learn the opposite: how to retrieve email information using Google Apps Script. We will assume that you have a valid Google account hence, the information you want to retrieve comes from your Gmail. The GAS code relies on a search pattern to perform the searching in your mailbox. There are several options you can use in this pattern:.....
Tags: Google, Seo, Christos Samaras


How To Create & Use A Custom Function In Google Sheets

Last updated:08/09/2018, 5 min read Introduction Google Sheets, along with Google Docs and Google Slides are a spreadsheet, a word processor, and a presentation program respectively, all part of a free, web-based software office suite offered by Google within its Google Drive service. The three applications are available as web apps, mobile apps and desktop apps (on ChromeOS only). The applications are compatible with the corresponding Microsoft Office file formats, therefore, the user can... ...
Tags: Google, Seo, Google Docs, Microsoft Office, Christos Samaras, Google Slides, Google Apps Script


Email Engineering, Comments Policy, Blog-Related Stuff & My Free Time

Introduction I know that the title might look strange to most of you, nevertheless, in this post I will try to write about a few things that were spinning around my head for a long time, but, until now, I couldn’t find the time to write about them. The topics that are analyzed below are: “Email engineering” and new email policyNew comments policyBlog-related stuffMy free time So, as you might have already guessed, this post differs from the typical engineering/programming subjects that are... ...
Tags: Seo, Christos Samaras, Blog Related


Small Hydropower Plants – Useful Resources (Files & Links)

Introduction After long time - three and half years (!) – I decided to return to the subject of small hydropower plants. This time I tried to collect some useful resources that have helped me in the past during the elaboration of several hydroelectric studies. The files and the links that are given below will help you learn more about the potential and the advantages of small hydropower plants. Moreover, they might be a good starting point for a more thorough investigation of the subject.... ...
Tags: Seo, Christos Samaras, Useful Stuff


Website Log-In Automation With VBA

Introduction In the last few months I saw a lot of people struggling to automate the log-in procedure to various websites using VBA. To be honest, web-related tasks can be considered as advanced VBA topics, since in many cases require basic knowledge of HTML language. In this post I will try to provide some insights about how to automate the log-in procedure via VBA. More precisely, I will analyze the concept behind a reusable macro that I developed. The macro creates a new instance of Internet....
Tags: Seo, Office Tips, VBA, Christos Samaras


Get Email Information Into Google Sheets Using GAS

Last updated: 05/01/2019, 1 min read (without the code) Introduction We have already seen how to send emails directly from Google Sheets. In this post, we will learn the opposite: how to retrieve email information using Google Apps Script. We will assume that you have a valid Google account hence, the information you want to retrieve comes from your Gmail. The GAS code relies on a search pattern to perform the searching in your mailbox. There are several options you can use in this pattern:.....
Tags: Google, Seo, Christos Samaras


Send Multiple Emails From Google Sheets Using GAS

Last updated: 08/12/2018, 3 min read (without the code) Introduction Have you ever wondered how is it possible to send multiple emails to different recipients, without counting on external services, like MailChimp, AWeber, Mailerlite and others? If the answer to this question is yes, then you would probably be surprised to learn that you can achieve this by simply using Google Sheets and some custom code written in Apps Script. In this post, we will assume that you already have the email... ...
Tags: Google, Seo, Christos Samaras, MailChimp AWeber Mailerlite


Creating & Customizing Column Charts In Google Sheets

Last updated: 07/11/2018, 2 min read (without the code) Introduction Google Sheets, much like Microsoft Excel, incorporate many different chart types, which can help the user to visualize his/her data. In this post, we will learn how to create and customize a simple column chart in Google Sheets. There will be the “manual way”, the “coding way” – using Google Apps Script – as well a bonus tip for selecting chart colors. The manual way To create a column chart manually just follow these 2... ...
Tags: Microsoft, Seo, Christos Samaras, Google Sheets


Triggers & Events In Google Sheets

Last updated: 03/10/2018, 3 min read (without the code) Introduction According to the documentation, triggers let Google Apps Script run a function automatically when a certain event, like opening a document, occurs. Apps Script supports two types of triggers, simple and installable. Simple triggers are a set of reserved functions built into Apps Script, like the function onOpen(e), which is executed when a user opens a Google Docs, Sheets, Slides, or Forms file. Installable triggers, on the.....
Tags: Google, Seo, Christos Samaras, Google Sheets


Geocoding & Reverse Geocoding Functions In Google Sheets

Last updated: 28/08/2018, 1 min read (without the code) Introduction In the previous post, we learned the basics about developing and using a custom function in Google Sheets. It is time now to switch to something more advanced compared to our first example. We have seen in the past how to use Google’s geocoding services from VBA. Here we will see how to call these services using Google Apps Script (GAS). The main advantage when developing a GAS function is that, unlike VBA, you don’t need to....
Tags: Google, Seo, VBA, Christos Samaras, Google Sheets