“Interface not supported” error when attempting to open Excel or Word from Delphi

Interface not supported

When using Delphi that outputs some text into Excel or Word, I encountered the error “Interface not supported” on one machine

The problem was that the previous version of Excel was uninstalled incorrectly on the machine. To fix it, I used these steps :

  1. Open the regedit editor.
  2. Open HKEY_CLASSES_ROOT >> TypeLib >> {00020813-0000-0000-C000-000000000046}

(The Excel PIA key is {00020813-0000-0000-C000-000000000046}) 

3. Delete the version that you don’t have. Leave only the version that you have instaled. In my case it was Excel 2010 which is 1.7. For Excel 2013 is 1.8, and for Excel 2016 is 1.9

Here are the version controls

Excel HKEY_CLASSES_ROOT\TypeLib{00020813-0000-0000-C000-000000000046}\

  • 1.7 is for Office 2010
  • 1.8 is for Office 2013
  • 1.9 is for Office 2016

Word HKEY_CLASSES_ROOT\TypeLib{00020905-0000-0000-C000-000000000046}\

  • 8.5 is for Office 2010
  • 8.6 is for Office 2013
  • 8.7 is for Office 2016

PowerPoint HKEY_CLASSES_ROOT\TypeLib{91493440-5A91-11CF-8700-00AA0060263B}\

  • 2.a is for Office 2010
  • 2.b is for Office 2013
  • 2.c is for Office 2016

Outlook HKEY_CLASSES_ROOT\TypeLib{00062FFF-0000-0000-C000-000000000046}\

  • 9.4 is for Office 2010
  • 9.5 is for Office 2013
  • 9.6 is for Office 2016

Hope it helps

Coffee Cup

There are seven things that poor people do that the wealthy don’t

This is my first contribution to the field of wealth management. I sincerely hope that I will be able to assist someone in rising above the ruins of poverty. If you’ve had some of these ideas for a long time, it’s advisable to give them away and adapt new ones to help you become financially independent.

  1. Rich folks read or listen to audio books while poor people watch TV.

Garbage in, garbage out, as the saying goes. When you’re sitting in front of the television, you can’t come up with great ideas or inspirations. The television nowadays has been programmed to keep you captivated to the screen.

I’ve always thought that if you want to progress in life, you have to start with yourself. There is no other way to learn but to read the books written by great leaders about their lives.

Practical applications : You must seek out a mentor. YouTube is the next best thing to a library in my opinion. There are a plethora of success audiobooks and wealth audiobooks to pick from. Look for someone you want to be like. Listen for a time and then go for it if it makes sense.

  1. Poor people are paid on the basis of time, but wealthy people are rewarded on the basis of results.

You could be the best package counter or server in the restaurant at work. Because of the value you contribute to the market, you have a low income. If ten people can do the same job as you, you aren’t very valued at work.

The wealthy want to make a difference in the world, whether it’s for the environment or for humanity. The rich invest a great amount of time and effort into creating a product that meets a societal need. This is what value creation entails. Athletes are not compensated based on the number of hours they train, but rather on their performance.

Practical applications : You must re-invest in yourself. Study or follow a passion for something you’ve always wanted to do, such as photography or software development. You can study for 365 hours in a year if you study for an hour a day.

  1. Poor individuals blame others for their misfortune, whereas wealthy people accept responsibility for their own misfortune.

It is often simple for disadvantaged individuals to place blame on others. They can either blame the government or the boss for their position. Some even accuse God and the weather of being to fault. The city in which they resided, as well as their neighbors.

Rich individuals, on the other hand, take responsibility for their actions, whether they are good or harmful. What frequently happens is that wealthy people ponder about the problem or seek expert advice from others to address it.

Practical applications : We all have issues. It should be set aside for the needy. The rain poured on the rich and the poor alike. But there is a solution if you allow your mind to assist you in figuring out how to fix your difficulties.

  1. Poor people concentrate on saving, whilst wealthy people concentrate on investing.

This is when the uncles and aunts will tell you that we shouldn’t drink Starbucks to save a few bucks here and there. Alternatively, we may fly in economy throughout our trips.

Rich people, on the other hand, concentrate on increasing their wealth. Some investments are hazardous, but they pay off handsomely. The money you earn from your investment is utilized to buy things.

Practical applications : This one is quite difficult to begin. The goal is to set aside at least 40% of your income. We all make adjustments based on how much money we have left. After a year of this, the next stage is to hunt for dividend-paying investment products, such as the stock market or money markets.

  1. Poor individuals believe they know everything, whereas wealthy people are constantly learning.

Poor people are always expressing their views. They are always keen to share their political and sporting perspectives with the rest of the world. The most recent rumor or scoop in the society.

Wealthy people are perpetually humble and willing to learn. They often hang out with people who are wiser than they are.

Practical applications : You’ll need to surround yourself with business people or those who want to be business people for this one. If you want to be a competent app developer, choose someone to model yourself after. However, it is important to remember to replicate the great aspects of life and avoid the negative ones.

  1. Poor people believe money is the source of all evil, but wealthy people believe poverty is the source of all evil.

When we think of poor neighborhoods, we think of criminals, drugs, and a variety of other problems. If you think about it, bank robbers are not wealthy people. Money is a tool that may be used for either good or evil.

Rich people, on the other hand, began with the intention of assisting others. The money will then follow. They are compensated for solving challenges.

Practical applications : For a long time, families have avoided discussing money with their children, leaving them unsure of what to do with the money when it arrives. We need to modify this to show that money isn’t the problem; it’s what you do with it that is. You can still choose to use it for good or evil.

  1. The poor have a lottery mentality, while the wealthy have an action mentality.

People who are poor desire to buy lottery tickets. Winning is the only way to become wealthy. It’s all a coincidence. People who are wealthy take action. We’re confident that we’ll be able to pull it off. Do not put your faith on a lottery ticket.

Practical applications : Being reliant on luck has never made anyone wealthy. The term “burning the midnight oil” is one that everyone seems to be scared of. Rich people aren’t afraid to work all day if it means they’ll get closer to their objectives.

Video link : https://youtu.be/6c0d9Jlr8JE

Contact Us – How to send email with attachment in PHP

Send Email Attachment

I have done a lot of contact us page in websites before and this one, i had to add email attachments as well. The secret to it was to upload it to your website before you can send it as an email attachment.

Recently I found a great website that does that.

Hope it helps somebody out there

Coffee Cup

<?php 
 
// Recipient 
$to = '[email protected]'; 
 
// Sender 
$from = '[email protected]'; 
$fromName = 'CodexWorld'; 
 
// Email subject 
$subject = 'PHP Email with Attachment by CodexWorld';  
 
// Attachment file 
$file = "files/codexworld.pdf"; 
 
// Email body content 
$htmlContent = ' 
    <h3>PHP Email with Attachment by CodexWorld</h3> 
    <p>This email is sent from the PHP script with attachment.</p> 
'; 
 
// Header for sender info 
$headers = "From: $fromName"." <".$from.">"; 
 
// Boundary  
$semi_rand = md5(time());  
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";  
 
// Headers for attachment  
$headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; 
 
// Multipart boundary  
$message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" . 
"Content-Transfer-Encoding: 7bit\n\n" . $htmlContent . "\n\n";  
 
// Preparing attachment 
if(!empty($file) > 0){ 
    if(is_file($file)){ 
        $message .= "--{$mime_boundary}\n"; 
        $fp =    @fopen($file,"rb"); 
        $data =  @fread($fp,filesize($file)); 
 
        @fclose($fp); 
        $data = chunk_split(base64_encode($data)); 
        $message .= "Content-Type: application/octet-stream; name=\"".basename($file)."\"\n" .  
        "Content-Description: ".basename($file)."\n" . 
        "Content-Disposition: attachment;\n" . " filename=\"".basename($file)."\"; size=".filesize($file).";\n" .  
        "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; 
    } 
} 
$message .= "--{$mime_boundary}--"; 
$returnpath = "-f" . $from; 
 
// Send email 
$mail = @mail($to, $subject, $message, $headers, $returnpath);  
 
// Email sending status 
echo $mail?"<h1>Email Sent Successfully!</h1>":"<h1>Email sending failed.</h1>"; 
 
?>

How to Fix Windows 10 “Cannot Connect to Printer” – Error 0x0000011b

How to Fix Windows Cannot Connect to Printer

I have a case that a newly installed windows 10 pc, although already shared the 2 printers, the pc on the network cannot establish share.

The system says ‘Connect to Printer’ error.

What you can do is to go to registry editor,

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print

right click and create new DWORD 32 Bit

RpcAuthnLevelPrivacyEnabled

right click and click Modify. it should be hexadecimal with 0

Next is to open the windows services and look for PrinterSpool

Then right click and then click RESTART

After that, you can now use File Explorer to add the printer remote thru the network.

Hope it helps

Coffee Cup

Microsoft SQL Server Eating Lots of Hard Drive

Microsoft SQL Server Dump Files

I had a case recently about their server that have zero 0 space remaining in their drive C. i have seen this issue before and it involves the dump files collected every time the server is restarted.

The path to the dump files can be “C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\Polybase\dump”

Another path is “X:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log”

Recently i have searched if there was a way to turn it off

Some have version folders

VersionPath
SQL Server 2019C:\Windows\SysWOW64\SQLServerManager15.msc
SQL Server 2017C:\Windows\SysWOW64\SQLServerManager14.msc
SQL Server 2016C:\Windows\SysWOW64\SQLServerManager13.msc
SQL Server 2014C:\Windows\SysWOW64\SQLServerManager12.msc
SQL Server 2012C:\Windows\SysWOW64\SQLServerManager11.msc

net start “SQL Server (MSSQLSERVER)”

next i found is the data collector

USE msdb; GO EXEC dbo.sp_syscollector_disable_collector;

Hope this info help out a fellow traveller

Coffee Cup

Business Models Ideas (20210914)

Business Ideas
  • Consulting – price / events / value of knowledge
  • Blogger – collaboration / click per view / online courses
  • Property Management – shove snow / mow loan / doing maintenance / show apartments / get landlord / collect cash
  • Drop shipping – no handling fees / marketing / advertising / list amazon / eBay / manufacturer / send to customer / sell using own brand / online store / market place / Lazada and Shopee
  • Affiliate Marketing – indirect influencer / niche / affiliate / click bait / amazon / follow link / blog or social media / talk makeup put links / clink juncsion
  • Errand / Services – grocery / chores / dry cleaning / super assistant to busy boss / DTI / payroll
  • Online Printing – printed on t-shirt / affordable designer / ambassador / seasonal trend / Feb. lover t-shirt
  • Interior Design – design for clients / consultation
  • Photography – stock photos / decent camera
  • Advertising – newspaper commercials / book or website / put qr code / google ads / seo
  • Free Premium – model certain features are free and certain features are not. Gmail storage limit / WordPress platform with add-in template and plug-ins
  • Subscription – Milkman deliver milk and take the money. Recipe / Nike sign0up / Coffee patrons
  • Transaction – give service / give money

Property Ideas (20210213)

Property Notes

These are suggestions on how to expand and business ideas

Business – bakery , tricycle , egg dealer , barber , coffee , restaurant , fish ball , automotive , organic farming , Korean food , inihaw manok, refilling station

Salary of the people – lifestyle – hobbies – past time

Land – farming , motorcycle terminal, aquaponics, animal farming, tour guides, prepare to stay, scenic spots , food carts , commissary , fiesta , seasonal food (dragon fruit / sili), solar panel, water generation, sell online, prepack food , pigfeed , cooked food

Market – resto, hotels, hospitals, barangay fiesta, party, palengke , weddings , office , carinderya.

7R Theory by Dhaval Bathia

7R Theory

To earn money we have 7 options starting with R. When i first heard this one I was amazed on how simple it is. A lesson worth hearing him in person on Youtube

  1. RATE – This pertains to the selling price of items.
  2. RENUMERATION – This refers to profession such as doctor or lawyer
  3. REPLICATION – Refers to man and machine or automation. the lesser the workforce, the more money the business can save
  4. RENT – This refers to rental income or property appreciation.
  5. ROYALTY – This refers to a product from your talent. It may be a game such as Candy Crush, or a YouTube video and blog
  6. RIGHTS – This refers to franchises, brand and logo
  7. RETURNS – This refers to stock market, gold or silver , properties , interest , dividends and appreciation

7 Truths to become rich. Richest man in Babylon (20201120)

Truths of becoming rich

These are tried and tested rules for the rich and those who want to become one. All of these rules we need to keep near our financial wallets in order to survive. There they are

  1. Start your purpose for wallet fattening – Save 10% from 100% income. So far this is the hardest part and we start with this one. A famous rich person once said, it’s either you increase your income or you shrink to your income.
  2. Control thy expenditures – Budgets are good in these situations. We need to sacrifice today, for our financial situation to improve in the future.
  3. Put each coin to labor – This means to have investments in things that produce more money. A simple example of this is the bank account. But nowadays, people invest in digital investments that give 2% to 3% interest.
  4. Guard thy treasure from loss – The people we lend money must have the power to repay it back. We need security to the risk. We can do this by issuing a collateral.
  5. Make thy dwelling a profitable investment – If you buy a house, make sure you do not overpay for it. As a rule of thumb, you need to provide security and make wifey happy.
  6. Ensure a future income – We also need to plan for the future. Invest or become a money lender. That is called leverage. It can also give protection to the family.
  7. Increase they ability to learn – Cultivate skills and build confidence in yourself. Learn from the masters you want to reach.