Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-01-2013, 08:34 AM
stubdba stubdba is offline Set Picture Size on Header with VBA Windows 7 64bit Set Picture Size on Header with VBA Office 2010 32bit
Novice
Set Picture Size on Header with VBA
 
Join Date: Mar 2013
Posts: 1
stubdba is on a distinguished road
Default Set Picture Size on Header with VBA

Hello
I'm trying to set the shape size of a picture in my header on a landscape page but I just can't get the code to change the size.



If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=2
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="land"
Selection.Range.InsertAutoText


Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.ShapeRange
.Height = 2.79
.Width = 26.6
End With


All I'm wanting to to do is when I insert a landscape page in my document I want to call the autotext for the landscape image (this bits works) and then increase the size of the image from it's portrait size which is 2.78h x 18W 32%.

I've tried to record this step with a macro but this doesn't capture the code.

Thanks
Reply With Quote
  #2  
Old 03-01-2013, 05:11 PM
macropod's Avatar
macropod macropod is offline Set Picture Size on Header with VBA Windows 7 64bit Set Picture Size on Header with VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Cross-posted at: http://www.tek-tips.com/viewthread.cfm?qid=1705506
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184

PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Picture with standard size styleruk Word 4 02-10-2014 09:09 AM
Powerpoint automatically changing picture size when adding a picture (2010) One_Life PowerPoint 7 01-20-2012 06:57 AM
Set Picture Size on Header with VBA Picture size for Powerpoint roligan PowerPoint 2 12-22-2011 07:18 AM
Problem w/ Format Picture (size) John Woram PowerPoint 0 01-31-2010 10:29 AM
Set Picture Size on Header with VBA Wrong Picture Size Roger A Firth Drawing and Graphics 6 11-01-2009 10:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft