Changing Powerpoint Export Resolution with VB Script

Share

Powerpoint has many powerful graphics capability, so it is not surprising that many people are using it as a tool to generate quick designs. You can use Powerpoint to easily create charts, buttons and headers for websites and blog posts.

In many cases, you would export your design into files of different graphic formats such as PNG, JPEG or GIF and perhaps work on them using other graphic software, and you are likely going to need to convert the files into different resolution (dpi) depending on needs. For example, screen is relatively low in resolution whereas printer matter requires higher resolution.

Strangely and unfortunately, there is no direct way of changing the conversion resolution from Powerpoint. The suggested method of changing the resolution is through adding/modifying a registry key. To some people, modifying registry keys is a risky operation, or at least an uncomfortable one….

This video shows you how to change the export resolution using a Visual Basic Script (VBS) instead of manipulating registry directly.

And here are the four versions of VB scripts mentioned in the video:

NOTE: I originally planned to have the Visual Basic Scripts as downloadable files, but I found that there was no straightforward way for me to do it with WordPress, so I am showing the actual scripts here. You can copy the version you like (just copy the text in color) and make it into a file with vbs extension. If you don’t know how to do this, please search youtube.com for “How to Create a vb script.”

Powerpoint 2007, entering resolution directly

 ' set location of registry
strRegistry = "HKCU\Software\Microsoft\Office\12.0\PowerPoint\Options\ExportBitmapResolution"
' create shell object set oShell = CreateObject("WScript.Shell")
vInput = InputBox("Enter desired resolution in dpi (50 to 307), default is 96", "PowerPoint 2007 Export Resolution")
if (IsNumeric (vInput)) then 
 if (vInput >= 50 and vInput <= 307) then 
 oShell.RegWrite strRegistry, vInput, "REG_DWORD" 
 bKey = oShell.RegRead (strRegistry) 
 MsgBox "Registry value set to " & bKey & "." 
 elseif vInput <> "" then 
 MsgBox "Illegal value (" & vInput & ")." 
 end if 
else MsgBox "Illegal value (" & vInput & ")." 
end if

 

Powerpoint 2007, for choosing from a list of common resolution

 ' set location of registry
 strRegistry = "HKCU\Software\Microsoft\Office\12.0\PowerPoint\Options\ExportBitmapResolution"
' create shell object
 set oShell = CreateObject("WScript.Shell")
vInput = InputBox("Select the desired resolution (1 to 7)" & vblf & _
 " 1. 50 dpi" & vblf & _
 " 2. 96 dpi (PowerPoint default)" & vblf & _
 " 3. 100 dpi" & vblf & _
 " 4. 150 dpi" & vblf & _
 " 5. 200 dpi" & vblf & _
 " 6. 250 dpi" & vblf & _
 " 7. 300 dpi", "PowerPoint 2007 Export Resolution")
if (IsNumeric (vInput)) then
 if (vInput >= 1 and vInput <= 7) then
Select Case vInput
 Case 1
 vValue = 50
 Case 2
 vValue = 96
 Case else
 vValue = (vInput - 1) * 50
 End Select
oShell.RegWrite strRegistry, vValue, "REG_DWORD"
 bKey = oShell.RegRead (strRegistry)
 MsgBox "Registry value set to " & bKey & "."
 elseif vInput <> "" then
 MsgBox "Illegal selection (" & vInput & ")."
 end if
 end if

Powerpoint 2010, for entering resolution directly

' set location of registry
 strRegistry = "HKCU\Software\Microsoft\Office\14.0\PowerPoint\Options\ExportBitmapResolution"
' create shell object
 set oShell = CreateObject("WScript.Shell")
vInput = InputBox("Enter desired resolution in dpi (50 to 307), default is 96", "PowerPoint 2010 Export Resolution")
if (IsNumeric (vInput)) then
 if (vInput >= 50 and vInput <= 307) then
 oShell.RegWrite strRegistry, vInput, "REG_DWORD"
 bKey = oShell.RegRead (strRegistry)
 MsgBox "Registry value set to " & bKey & "."
 elseif vInput <> "" then
 MsgBox "Illegal value (" & vInput & ")."
 end if
 else
 MsgBox "Illegal value (" & vInput & ")."
 end if

Powerpoint 2010, for choosing from a list of common resolution

' set location of registry
 strRegistry = "HKCU\Software\Microsoft\Office\14.0\PowerPoint\Options\ExportBitmapResolution"
' create shell object
 set oShell = CreateObject("WScript.Shell")
vInput = InputBox("Select the desired resolution (1 to 7)" & vblf & _
 " 1. 50 dpi" & vblf & _
 " 2. 96 dpi (PowerPoint default)" & vblf & _
 " 3. 100 dpi" & vblf & _
 " 4. 150 dpi" & vblf & _
 " 5. 200 dpi" & vblf & _
 " 6. 250 dpi" & vblf & _
 " 7. 300 dpi", "PowerPoint 2010 Export Resolution")
if (IsNumeric (vInput)) then
 if (vInput >= 1 and vInput <= 7) then
Select Case vInput
 Case 1
 vValue = 50
 Case 2
 vValue = 96
 Case else
 vValue = (vInput - 1) * 50
 End Select
oShell.RegWrite strRegistry, vValue, "REG_DWORD"
 bKey = oShell.RegRead (strRegistry)
 MsgBox "Registry value set to " & bKey & "."
 elseif vInput <> "" then
 MsgBox "Illegal selection (" & vInput & ")."
 end if
 end if

 

 

 

Share

Leave a Reply

Your email address will not be published. Required fields are marked *