PST size in outlook does not decrease even after deleting emails?

Here is why it does not:

Even when the emails are deleted, PST file size would remain what it was before deleting emails. However the unused space is used as emails keep coming in to your PST file and that’s how space is allocated. However on your hard disk, that unused space continues to remain occupied. Not a smart way to use your storage, is it?

So here’s what you do to fix that.

If the PST file size is larger(I know a subjective term, but the one I had was 13 GB), it is likely to have errors, so first go ahead and run scanpst.exe. Select the PST file that is in trouble. This runs in 2 phases, first analyze the file and then actually repairing it.

Once it is done analyzing it, it will tell you the number of errors etc. Once done, hit repair. Now this process might take some time depending on the size of your PST file. Your dialogue box might also turn into “Not responding”, but have patience, its gonna come back. A log file would have been created at the same place where your PST file is. Just in case, you want to review what did this repair utility did.

Once the repair process is done, Right click on PST file in outlook –> Data File properties –> Advance –> Compact. Now this too can take quite some time, depending upon your the size of your PST file. Once done, go back to the folder where you had your PST file and check for yourself, the PST file size would have reduced to what actually it should be after deleting emails.

I had 13 GB PST file, deleted almost all emails, encountered this problem, followed what I just stated above and PST size is now just 62 MB.

Hope this helps!

Cheers,

Sunil Thacker

How to use “Enabler for Excel” API to Sales force for your VBA Macros

Purpose:
There would not be any point in doing this unless it serves the purpose to either the result of what you are doing or how you are doing it. so its better to ask “WHY” before you take on this path to do your sales force reports.
So, lets address that first!

Why does one need to use an API to import the data/report from Sales force?

Well, there are various reason why one would have to or want to use this way of doing sales force reports. Here are a few.

1. Sometimes the data/report that you get from sales force is not how you want to present it. so you need that data to be in excel and then put your formats in place. Reason for that could be audience of the report prefers the data in one way or the other.
2. Sometimes sales force does not allow you to schedule the report but by using this API with VBA macro, you can actually schedule the report and run it as many times as you want and when you want.
3. Because VBA is pretty comprehensive in automating reports, we can have fully automated reports.
4. You do not have to interact with sales force at all, once you are done setting up your API and your code in VBA.

So there could be many more reasons. Above given reasons are the ones why I chose to use the enabler for Excel API.

Now if you ask, why this API only and not any other? Well, that’s because this API was lucky to get to my attention first and I just happened to figure it out in a few minutes and I liked how easier it is to use it.

So, I’d provide you a few links below on how to install this free API. Once you install it, follow my instruction on how to write a few lines of code to make it work.

Get your “Enabler for Excel” API from here
How to install and wiki for this API

So the first link is where you get your API installed, and second one is where you learn how to install API.

Now that you have your API installed, Here is the essential code for how to use Excel for Enabler API and use VBA macro to import data/report from sales force.

Note – Green is the comments, explaining each line of code.
====================CODE STARTS

Private Sub ImportReport()

Dim addin As Office.COMAddIn
Dim automationObject As Object
Dim error As String
Dim error1 As String
Dim Result As Boolean
Dim ReportResult As String

this code sets “Enabler For Excel” as ADDIN for “automationObject” OBJECT

For Each addin In Application.COMAddIns
If addin.Description = "Enabler for Excel" Then
Set automationObject = addin.Object
End If
Next addin

Login to environment “password and security token has to be in one word” ; “URL could sometimes be different based on the organization you work for, so do check before pasting this code”

Result = AutomationObject.LogIn("UserName","PasswordSecurityToken", "https://login.salesforce.com",error)

So if the authentication fails in the code above that it would have return’ed false and this condition would be true and hence the error message would be displayed, which is contained in variable error an’d at this point entire function ends, none of the below code gets executed.

If Result = False Then
MsgBox error
End
End If

At this point our authentication is done. We are just running a report that we already have created in sales force. We are using a 15 or 18 character Report Id to identify which report do we want to run. Where do we get Report Id? Well just open your sales force report and see the URL in your browser now. there you will find your Report ID, just paste that id between double quotes here

ReportResult = automationObject.RunReport("XXXXXXXXXXXXXXX", error1)

Dim ws As Worksheet
Set ws = ActiveSheet

This code paste entire report on cell C6 onwards, I could use any according to my convenience.
Now you have your data in Excel, run your further automation on this format it and you can make a report completely automated without even looking at it.

With ws.QueryTables.Add(Connection:="TEXT;" & ReportResult, Destination:=ws.Range("C6"))
.TextFileParseType = xlDelimited
.TextFileCommaDelimiter = True
.Refresh
End With

End Sub

====================CODE ENDS

Movie Review – Jab Tak Hai Jaan

Official Trailer –

Movie on IMDB – http://www.imdb.com/title/tt2176013/

Movie on Wiki – http://en.wikipedia.org/wiki/Jab_Tak_Hai_Jaan

The movie gives you an experience to refresh yourself. A very decent love story with a very different Angle to love. The back ground score is amazing. A R Rehman is just great. I like those famous JTHJ lines by SRK, A song “Sanso me teri..” and that bubbly number on Akira “Jiya jiya re jiya..”. A Yash Chopra with his direction giving every scene brighter is a winner too. A fresh story to a love triange. Finally a movie which has some content(those who are bored with typical comedy movies, this one’s for you). Katrina is learning acting, but she still was expressionless. Akira is too good, SRK as always great at Romance. As they say, this guy can ROMANCE with even a bloody tree. Whats not right about the movie? Here we go.. as every other KJo and YRF movie, SRK takes 70% of the screen time, irrespective of the stature of other actors in the movie. Katrina too, is sacrificing here, but the movie is all about Samar Anand. A song or two could have been avoided to keep the audience interested. Its just too long to hold on to it, you loose the interest inbetween. So I’d go with 3 on 5 for this last love saga by YASH ji, the Legend.

Movie Review – Man on a Ledge

Official Trailer –

Movie on IMDB – http://www.imdb.com/title/tt1568338/

Movie on Wiki – http://en.wikipedia.org/wiki/Man_on_a_Ledge

The best thing about this movie is, after first 15 minutes, it just keeps you with it. You don’t want to miss a bit in the movie. The story telling is good here. The content, the story itself scores here. Not sure why there was a need of a lady playing a role to talk down this guy. It could just have been any other guy. In fact the guy Edward Burns was already there with his peculiar accent. Movie does tend to feel like its similar to what we have seen in The Negotiater starring Samuel Jackson and one of my favourites Kavin Spacey. However this movie does have its own space. Sam has done a good job. Direction and back groud score too are doing justice. You won’t regret a tub of pop corn and a couple of expensive tickets. I’d give 3 on 5 and a generous version of me would add a half to that.

Movie Review – Skyfall

Official Trailer –

Movie on IMDB – http://www.imdb.com/title/tt1074638/

Movie on Wiki – http://en.wikipedia.org/wiki/Skyfall

As every other Bond movie, this one too begins with a chase. but guess what this one is not as nail biting as the one that we saw in Casino Royale. The movie is slow. Back ground score does not give you goose bumps. Action is pretty ordinary too, which is very unlike 007. We are loosing our sweet lady, M. There are a very few gadgets in the movie. Pretty weak story. A slow BOND, sky high expectations and BOND is saving just an old lady. 007 saving anything less a country or a huge catastrophe is in a way, insulting BOND brand. If this was a NON-Bond movie. I guess I’d just say its a good movie. Another important thing to notice is that, if a BOND movie is followed by most people watching it, then that can’t be a BOND movie, it usually requires that geeky, movie freak audience to understand the movie. Now look at what was good about the movie, 3 things only. Introduction of a new M, a new Q and performance of Javier Bardem. Hope with those 2 new’s, we get a better BOND movie in the time to come. In a nutshell this movie doesn’t have anything BOND’ish about it. I’d go with 2 on 5 for this one.

Movie Review – Oh My God

Official Trailer –

Movie on IMDB – http://www.imdb.com/title/tt2283748/

Movie on Wiki – http://en.wikipedia.org/wiki/Oh_My_God_(2012_film)

The movie begins well with a pretty middle class family drama but before you know it, the story starts. The story is good, and Paresh Rawal has done the job just perfect. Akshay Kumar as the Lord Krishna is just great. He portrays that jolly good persona of Lord Krishna and it works just well with people. Character of Mithun da is not nice. Why is the Pandit given a female side in his character was a BIG question for me. The movie could have been in a trouble because of the kind of topic it has chosen. But I guess people were too busy in their own world to create any issue for the movie. Logic of religion and how religion has been commercialized these days is the heart of the story which they have very well depicted. so the movie conveys what it is trying to. However few things could have been added to make people think more about how religion has been used this days more for wasted interest(such as politics and money/business) than for spirituality.  Also I didn’t like the fact that movie shows and almost concludes that all the Pandits and Pujaris are fraud. Also it focuses only on Hinduism to a very large extent and just a line or two of criticism for Christianity and Islam. I am sure this was done to make sure movie doesn’t impact social and political balance of the society. (The history of this country shows the tolerance level of Hindus) But I think If you are making movie on religion(or rather to criticize religion) then all religions should have been given equal screen time because all religions are equally corrupt. I’d give 3 out of 5 to this movie.

Movie Review – Gangs Of Wasseypur II

Official Trailer –

Movie on IMDB – http://www.imdb.com/title/tt1954470/

Movie on Wiki – http://en.wikipedia.org/wiki/Gangs_of_Wasseypur_-_Part_2

So GOW-I had already set high expectations for this one, and when people saw the trailer of this part 2, expectations were sky high. I must say Anurag Kashyap has not disappointed those with high expectations. The story, direction, music and characters all are as sharp as they can get. The character of Faizal is very nicely depicted and actor has pulled it off well too. Full marks to the actor. Like the part 1, narrator has that pinch in his voice which is just amazing with this kind of a movie. Something that makes me say too much, was the girl with Faizal. At some point I did feel this girl could have been avoided in some scenes. I liked the end of the movie too, which shows that this game of power goes on, just the individuals who posses this power changes. I’d give 4 out 5 to this movie.