vb.net - Using VB as automation, I want to tick the PowerPoint option box "Do not compress images in file" -


i'm adding feature program copies file surfer , pastes powerpoint slide. surfer image large, , need have small portion of surfer file visible in framing of powerpoint slide.

the problem i'm having when open powerpoint, default have copied , pasted images compressed. whatever showing in powerpoint slide blurry because of compression. when without automation , turn off image compression, looks perfect.

please note program not me, it's distributed others within company, can't expect other people want use program change default settings. want figure out how turn off compression.

here's have far:

        'opens surfer         objsurferapp = createobject("surfer.application")         'open powerpoint         objpptapp = createobject("powerpoint.application")         objpptmapseries = objpptapp.presentations.add          'copies image surfer         objsurfermap.shapes.selectall()         objsurfermap.selection.copy()          slidecount = objpptmapseries.slides.count          'adds new slide         objpptmapseries.slides.add(slidecount + 1, powerpoint.ppslidelayout.pplayoutblank)          'pastes image powerpoint slide         objpptmapseries.slides(slidecount + 1).shapes.paste()         objsurfermap.close() 

i don't have ideas except bundling template ppt program checkbox ticked, doesn't seem elegant of solution. consideration. i'm relatively new programming , new stackoverflow, please let me know if there's obvious should seeing.

as far know, compression settings not exposed via object model. can turn compresson on/off via reg setting though. here manual instrux. , need when ppt isn't running, else won't work.

close power point

open registry editor (start /run , type regedit)

go [hkey_current_user\software\microsoft\office\12.0\powerpoint\options]. change "12.0" "14.0" powerpoint 2010 or "15.0" powerpoint 2013.

create new dword value named automaticpicturecompressiondefault

make sure value of new dword 0

close registry editor

now, default, powerpoint not compress pictures. if want enable compression, go same registry key , change value 0 1.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -