News:

Happy New Year!

Main Menu

Automatic resize images

Started by Schwabe, November 28, 2010, 03:02:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Schwabe

I use Visio to display hundreds of iPhone screenshots to help map out every user interaction in my app.

What I've been doing is exporting the screenshots from Photoshop as PNGs and then importing them to Visio.    I have to import at a fairly high resolution so the images aren't blurry when I export to PDF.   After I import the screenshot, I have to scale it down significantly to fit within the dimensions of a page.   

This works okay, but the problem is I have to manually resize every time - and there are hundreds of screens so this is getting monotonous.    Is there a way I can automate the process so when I import a picture it scales down to a preset size?

Trex2001

Here is a very simple example to get you started:

Sub test()
Dim shp As Shape
Set shp = ActivePage.Import(YourFileAsString)
shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormWidth).FormulaU = "500mm"
shp.CellsSRC(visSectionObject, visRowXFormOut, visXFormHeight).FormulaU = "300mm"
End Sub


YourFileAsString is the full path filename to your file.

Post if you need more help

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 154 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1065KB.
Tokens: post-login.
Cache hits: 13: 0.00132s for 26,602 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]