J
jon.souter
A very helpful guy by the name of Doug has given me some great pointers
and I'm already several steps further down the road I need to travel
after just an hour of reading!
However, after checking various sections of the VBA help system, I was
kind of expecting to be able to do something like this in code...
Sub test()
'// Create "Handle" Variable For A Shape Object //
Dim MyPicture As Shape
'// Create Picture (A Word "Shape" Object) & Assign To MyPicture //
MyPicture = ActiveDocument.Shapes.AddPicture("c:\photos\maple.png")
'// The Following Code Resizes The "MyPicture" Object //
MyPicture.ScaleHeight 100, True
MyPicture.ScaleHeight 100, True
End Sub
However, this generates errors - so I've either gotten the syntax
wrong, or my ideas about using objects are alien to VBA!
If I can't marry some kind of variable to an object, such as a picture,
how can I reliably manipulate this one object - as the use of the
"Items" collection looks a bit hap-hazard.
All help is most welcome,
Cheers,
Jon
and I'm already several steps further down the road I need to travel
after just an hour of reading!
However, after checking various sections of the VBA help system, I was
kind of expecting to be able to do something like this in code...
Sub test()
'// Create "Handle" Variable For A Shape Object //
Dim MyPicture As Shape
'// Create Picture (A Word "Shape" Object) & Assign To MyPicture //
MyPicture = ActiveDocument.Shapes.AddPicture("c:\photos\maple.png")
'// The Following Code Resizes The "MyPicture" Object //
MyPicture.ScaleHeight 100, True
MyPicture.ScaleHeight 100, True
End Sub
However, this generates errors - so I've either gotten the syntax
wrong, or my ideas about using objects are alien to VBA!
If I can't marry some kind of variable to an object, such as a picture,
how can I reliably manipulate this one object - as the use of the
"Items" collection looks a bit hap-hazard.
All help is most welcome,
Cheers,
Jon