Friday, July 24, 2015

Import images to PowerPoint Automatically

In our day to day office work it is a regular task to make management presentations and obviously to do this we need many many images to be placed in powerpoint file.

What if we can do this at click of button :-)

So I have made a program which will do this work for you automatically.

Here is some automatic macro program to help you uploading pictures automatically from your hard disk into a PowerPoint presentation.

Follow the simple steps to have this macro in your book1 and then assign some shortcut so as to insert pictures automatically to your PowerPoint presentation.

STEPS
1) Copy the source code given in this post in between two lines
2) Open a new blank PowerPoint presentation with any name you like
3) It will ask you to click to add new slide - do it
4) Goto the Tools menu --> Macro --> Record New Macro
5) It will show default macro name as "Macro 1", just select OK
6) Now select STOP macro record button
7) Now press Alt + F11 to goto the Visual Basic editor
8) Expand the left window upto Module1 level by double clicking it
9) You will see Sub Macro1()
10) Select all code there and paste the code below in that window
11) Close the Visual Basic editor
12) Now press Alt + F8 buttons together to get macro Run dialogue box
13) Select the macro "ImageUpload" and press Run
14) It will ask for filetype (Default is JPG), press OK
15) It will automatically insert all images in the folder in which this Powerpoint file is placed

DONE :-)

Make such master file which contains this macro with any name you like say "ImageUplod.PPT"

Copy this file to any folder that contains images to be uploaded to PPT file, then rename it as you like, then open and run the macro to import all images at a stretch.

I know it is bit difficult to do this for very basic level people so they can just leave me a comment with email ID and I will send compiled file to them over email.

Also I have made complete code which adds a button toolbar, so just press a button and import images type, this will be posted by me in next week.

Cheers !!



Copy the code below :

'===============================================================================
Sub ImageUpload()

Dim wb As Presentation
Set wb = ActivePresentation


Dim strTemp As String
Dim strPath As String
Dim strDir As String
Dim strFileSpec As String
Dim oSld As Slide
Dim oPic As Shape

strFileSpec = InputBox(Prompt:="Enter type of image files to import", _
Title:="ENTER FILE TYPE", Default:="JPG")
strFileSpec = "*." & strFileSpec

strPath = wb.Path & "\"
strFileSpec = "*.jpg"
strDir = strPath & strFileSpec
strTemp = Dir(strDir)
Do While strTemp <> ""

Set oSld = ActivePresentation.Slides.Add(ActivePresentation.Slides.Count + 1, ppLayoutBlank)
Set oPic = oSld.Shapes.AddPicture(FileName:=strPath & strTemp, _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, _
Left:=0, _
Top:=0, _
Width:=100, _
Height:=100)

With oPic
.ScaleHeight 1, msoTrue
.ScaleWidth 1, msoTrue
End With

strTemp = Dir
Loop

For NumSlide = 1 To ActivePresentation.Slides.Count
ActivePresentation.Slides(NumSlide).Select
For Each Picture In ActiveWindow.Selection.SlideRange.Shapes
Picture.Select
Picture.LockAspectRatio = msoTrue
Picture.Height = 450 'Change this numbers to fit your needs
'Picture.Width = 500 'Change this numbers to fit your needs
Next
Next
End Sub

'===============================================================================

Thursday, July 23, 2015

Review Sony Cybershot DSC-750

At the beginning of New Year 2009, we thought to buy something to preserve memories :-) and the obvious choice was a digital still camera.

After doing some research regarding different make and specifications of the cameras, in consultation with friends who own them, we came to a fair idea of buying a SONY digital camera with specifications more than 5 Mega Pixels and having Lithium-ion battery pack.

So keeping these base specifications in mind my nephew and me went to Chinchwad station E zone store. Many models & options were available from different companies, but as decided we went on looking only for SONY models. After a small research we found that SONY Cyber-shot DSC-750 model with 8 Mega-pixel and 3X optical zoom with price tag of Rs 7300/- which was well within our budget as well as they offered 6~60% assured discount coupon based on scratch cards. So we thought of doing some more research for getting better price.

We moved down to Das electronics store, but in vain as it was offering at the same price for that model and without any scheme or discount at all!

So we moved down to Big-Bazaar (Chinchwad). At the counter the salesman (Mr. xxxx) told us the price tag of Rs. 7300/- We enquired for any discount scheme available on this camera? Mr. xxxx replied that there is no discount scheme, but you are getting this camera worth price of Rs. 8400/- on such a low price! So we turned back from the counter saying that E-zone has better offer than Big-Bazaar(though both have the same parent company, The Future group), at least we will get minimum 6% assured discount coupon. We just walked away 2~ 3 feet, and Mr. xxxx called us saying that "Sir you will get an IRON free on this purchase"! We got surprised and asked him why he did not tell us about this before we leave the counter? He just laughed for that...

We thought to come back there again if we don't get better deal from Pimpri market, so we moved down to Pimpri market. My prior experience is that you get better deals in Pimpri. We moved on to two-three major stores in Pimpri and to my surprise Big-Bazzar offering was the best!!

So we came back to Mr. xxxx counter at Big-Bazzar and asked him to bring the IRON and camera. While talking to him we said him that you should tell people about the Big-Bazzar offers as soon as customer comes to your counter and not when he leaves the counter, and this is bad practice. Suddenly something happened to him and he started shouting that I told you the offer but you did not hear it!!! So we got annoyed and told him that we will complain to his floor manager about this. He said that instead you telling floor-manager he himself will call him and explain!

He immediately called the floor manager Mr. Rahul Devangan. As soon as manager arrived he started telling him about the incident, in a way that he liked to tell. I interrupted and asked floor manager that whether he will listen to the customer or the salesman? What is correct strategy, but the salesman kept on pushing his story. So the floor manager was quietly listening to his story. After he finished his story, I explained the floor-manager the whole incident and asked him that you can loose some customer due to such behavior and we could have lost good deal!! Mr. Rahul Devangan immediately accepted that this is terrible mistake and apologized for that and also assured that he will make sure that all customers coming to that counter will get first hand correct information.

So happily we moved out with new camera. Outside Big-Bazzar there was a huge queue to enroll in lucky draw, so we also went ahead and enrolled ourselves in the lucky draw.
So please wish me luck to get grand price and do inform floor managers of the malls about any such incidents happening to you. They are there to help you and increase customer satisfaction!!

Keywords: Sony Cybershot DSC-750, Sony Cybershot DSC-750 purchase, Bigbazaar experience