i have written some code to convert picture files to metafile:

Sub CompressPictures()

Dim x%

With ActiveDocument.InlineShapes
For x% = 1 To .Count
.Item(x%).Select
Selection.Cut
Selection.PasteSpecial , , wdInLine, , wdPasteMetafilePicture
Next
End With

End Sub

i add pictures (screenshots) to the document regularly and would prefer only
to covert the new pics (bitmaps i think) - but i dont know how to read the
picture type before writing it - any ideas?

InlineShapes.Type ?????

Re: Reading picture types in vba by Jezebel

Jezebel
Sun May 28 21:12:32 CDT 2006

Answered elsewhere.


"JethroUK©" <reply@the.board> wrote in message
news:Tnseg.3786$002.1167@newsfe2-gui.ntli.net...
>i have written some code to convert picture files to metafile:
>
> Sub CompressPictures()
>
> Dim x%
>
> With ActiveDocument.InlineShapes
> For x% = 1 To .Count
> .Item(x%).Select
> Selection.Cut
> Selection.PasteSpecial , , wdInLine, , wdPasteMetafilePicture
> Next
> End With
>
> End Sub
>
> i add pictures (screenshots) to the document regularly and would prefer
> only
> to covert the new pics (bitmaps i think) - but i dont know how to read the
> picture type before writing it - any ideas?
>
> InlineShapes.Type ?????
>
>



Re: Reading picture types in vba by JethroUK©

JethroUK©
Sun May 28 21:47:23 CDT 2006

the only person that can decide whether it's answered (by definition) is
me - and it isn't!

anyone got any clues?


"Jezebel" <warcrimes@whitehouse.gov> wrote in message
news:u0mWYVsgGHA.2456@TK2MSFTNGP04.phx.gbl...
> Answered elsewhere.
>
>
> "JethroUK©" <reply@the.board> wrote in message
> news:Tnseg.3786$002.1167@newsfe2-gui.ntli.net...
> >i have written some code to convert picture files to metafile:
> >
> > Sub CompressPictures()
> >
> > Dim x%
> >
> > With ActiveDocument.InlineShapes
> > For x% = 1 To .Count
> > .Item(x%).Select
> > Selection.Cut
> > Selection.PasteSpecial , , wdInLine, , wdPasteMetafilePicture
> > Next
> > End With
> >
> > End Sub
> >
> > i add pictures (screenshots) to the document regularly and would prefer
> > only
> > to covert the new pics (bitmaps i think) - but i dont know how to read
the
> > picture type before writing it - any ideas?
> >
> > InlineShapes.Type ?????
> >
> >
>
>



Re: Reading picture types in vba by Doug

Doug
Sun May 28 22:48:59 CDT 2006

Well, it would help if you did not post the same question separately to
multiple newsgroups so that everything is kept in the thread. If you
believe that it is appropriate to post to more than one group, put the
newsgroup names in the header of the one message.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"JethroUK©" <reply@the.board> wrote in message
news:%gteg.1874$xH1.470@newsfe3-gui.ntli.net...
> the only person that can decide whether it's answered (by definition) is
> me - and it isn't!
>
> anyone got any clues?
>
>
> "Jezebel" <warcrimes@whitehouse.gov> wrote in message
> news:u0mWYVsgGHA.2456@TK2MSFTNGP04.phx.gbl...
>> Answered elsewhere.
>>
>>
>> "JethroUK©" <reply@the.board> wrote in message
>> news:Tnseg.3786$002.1167@newsfe2-gui.ntli.net...
>> >i have written some code to convert picture files to metafile:
>> >
>> > Sub CompressPictures()
>> >
>> > Dim x%
>> >
>> > With ActiveDocument.InlineShapes
>> > For x% = 1 To .Count
>> > .Item(x%).Select
>> > Selection.Cut
>> > Selection.PasteSpecial , , wdInLine, ,
>> > wdPasteMetafilePicture
>> > Next
>> > End With
>> >
>> > End Sub
>> >
>> > i add pictures (screenshots) to the document regularly and would prefer
>> > only
>> > to covert the new pics (bitmaps i think) - but i dont know how to read
> the
>> > picture type before writing it - any ideas?
>> >
>> > InlineShapes.Type ?????
>> >
>> >
>>
>>
>
>



Re: Reading picture types in vba by JethroUK©

JethroUK©
Mon May 29 05:10:08 CDT 2006

i 'had' a seperate post that didn't bear fruit - hence the new, wider,
x-post (now realise i should've done in the first instance)

regarding the subject - anyone got any clues?


"Doug Robbins - Word MVP" <dkr@REMOVECAPSmvps.org> wrote in message
news:OuuhWLtgGHA.3456@TK2MSFTNGP05.phx.gbl...
> Well, it would help if you did not post the same question separately to
> multiple newsgroups so that everything is kept in the thread. If you
> believe that it is appropriate to post to more than one group, put the
> newsgroup names in the header of the one message.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "JethroUK©" <reply@the.board> wrote in message
> news:%gteg.1874$xH1.470@newsfe3-gui.ntli.net...
> > the only person that can decide whether it's answered (by definition) is
> > me - and it isn't!
> >
> > anyone got any clues?
> >
> >
> > "Jezebel" <warcrimes@whitehouse.gov> wrote in message
> > news:u0mWYVsgGHA.2456@TK2MSFTNGP04.phx.gbl...
> >> Answered elsewhere.
> >>
> >>
> >> "JethroUK©" <reply@the.board> wrote in message
> >> news:Tnseg.3786$002.1167@newsfe2-gui.ntli.net...
> >> >i have written some code to convert picture files to metafile:
> >> >
> >> > Sub CompressPictures()
> >> >
> >> > Dim x%
> >> >
> >> > With ActiveDocument.InlineShapes
> >> > For x% = 1 To .Count
> >> > .Item(x%).Select
> >> > Selection.Cut
> >> > Selection.PasteSpecial , , wdInLine, ,
> >> > wdPasteMetafilePicture
> >> > Next
> >> > End With
> >> >
> >> > End Sub
> >> >
> >> > i add pictures (screenshots) to the document regularly and would
prefer
> >> > only
> >> > to covert the new pics (bitmaps i think) - but i dont know how to
read
> > the
> >> > picture type before writing it - any ideas?
> >> >
> >> > InlineShapes.Type ?????
> >> >
> >> >
> >>
> >>
> >
> >
>
>



Re: Reading picture types in vba by Jezebel

Jezebel
Mon May 29 06:59:44 CDT 2006

You've already had the answer. It's a pity it's not the one you want; but
asking the same question repeatedly in the hope of a new response is not
going to cure your cancer.


"JethroUK©" <reply@the.board> wrote in message
news:4Mzeg.4186$zv2.2673@newsfe4-gui.ntli.net...
>i 'had' a seperate post that didn't bear fruit - hence the new, wider,
> x-post (now realise i should've done in the first instance)
>
> regarding the subject - anyone got any clues?
>
>
> "Doug Robbins - Word MVP" <dkr@REMOVECAPSmvps.org> wrote in message
> news:OuuhWLtgGHA.3456@TK2MSFTNGP05.phx.gbl...
>> Well, it would help if you did not post the same question separately to
>> multiple newsgroups so that everything is kept in the thread. If you
>> believe that it is appropriate to post to more than one group, put the
>> newsgroup names in the header of the one message.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "JethroUK©" <reply@the.board> wrote in message
>> news:%gteg.1874$xH1.470@newsfe3-gui.ntli.net...
>> > the only person that can decide whether it's answered (by definition)
>> > is
>> > me - and it isn't!
>> >
>> > anyone got any clues?
>> >
>> >
>> > "Jezebel" <warcrimes@whitehouse.gov> wrote in message
>> > news:u0mWYVsgGHA.2456@TK2MSFTNGP04.phx.gbl...
>> >> Answered elsewhere.
>> >>
>> >>
>> >> "JethroUK©" <reply@the.board> wrote in message
>> >> news:Tnseg.3786$002.1167@newsfe2-gui.ntli.net...
>> >> >i have written some code to convert picture files to metafile:
>> >> >
>> >> > Sub CompressPictures()
>> >> >
>> >> > Dim x%
>> >> >
>> >> > With ActiveDocument.InlineShapes
>> >> > For x% = 1 To .Count
>> >> > .Item(x%).Select
>> >> > Selection.Cut
>> >> > Selection.PasteSpecial , , wdInLine, ,
>> >> > wdPasteMetafilePicture
>> >> > Next
>> >> > End With
>> >> >
>> >> > End Sub
>> >> >
>> >> > i add pictures (screenshots) to the document regularly and would
> prefer
>> >> > only
>> >> > to covert the new pics (bitmaps i think) - but i dont know how to
> read
>> > the
>> >> > picture type before writing it - any ideas?
>> >> >
>> >> > InlineShapes.Type ?????
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Re: Reading picture types in vba by macropod

macropod
Mon May 29 08:59:02 CDT 2006

Hi Jethro,

You could give each converted shape a unique bookmark, then you'd only need
to look for shapes that lack one.

Alternatively, you could paste the converted ones as Shapes (i.e. floating)
instead of inline, then you'd only need to look for shapes that are still
inline.

Cheers


"JethroUK©" <reply@the.board> wrote in message
news:Tnseg.3786$002.1167@newsfe2-gui.ntli.net...
> i have written some code to convert picture files to metafile:
>
> Sub CompressPictures()
>
> Dim x%
>
> With ActiveDocument.InlineShapes
> For x% = 1 To .Count
> .Item(x%).Select
> Selection.Cut
> Selection.PasteSpecial , , wdInLine, , wdPasteMetafilePicture
> Next
> End With
>
> End Sub
>
> i add pictures (screenshots) to the document regularly and would prefer
only
> to covert the new pics (bitmaps i think) - but i dont know how to read the
> picture type before writing it - any ideas?
>
> InlineShapes.Type ?????
>
>



Re: Reading picture types in vba by JethroUK©

JethroUK©
Mon May 29 16:54:46 CDT 2006

i gave that a try - but unsuccessfully - i cant float the shapes because
that changes the whole document - tried bookmarking but to do that i still
have to 'select' all the shapes first & it took even longer

it did give an idea however - i might just add a border to the shapes as
they're converted and i think i can check for the border without select the
shape

thanks for input


"macropod" <invalid@invalid.invalid> wrote in message
news:4e0clpF1caoqaU1@individual.net...
> Hi Jethro,
>
> You could give each converted shape a unique bookmark, then you'd only
need
> to look for shapes that lack one.
>
> Alternatively, you could paste the converted ones as Shapes (i.e.
floating)
> instead of inline, then you'd only need to look for shapes that are still
> inline.
>
> Cheers
>
>
> "JethroUK©" <reply@the.board> wrote in message
> news:Tnseg.3786$002.1167@newsfe2-gui.ntli.net...
> > i have written some code to convert picture files to metafile:
> >
> > Sub CompressPictures()
> >
> > Dim x%
> >
> > With ActiveDocument.InlineShapes
> > For x% = 1 To .Count
> > .Item(x%).Select
> > Selection.Cut
> > Selection.PasteSpecial , , wdInLine, ,
wdPasteMetafilePicture
> > Next
> > End With
> >
> > End Sub
> >
> > i add pictures (screenshots) to the document regularly and would prefer
> only
> > to covert the new pics (bitmaps i think) - but i dont know how to read
the
> > picture type before writing it - any ideas?
> >
> > InlineShapes.Type ?????
> >
> >
>
>



Re: Reading picture types in vba by macropod

macropod
Mon May 29 17:44:23 CDT 2006

Hi Jethro,

Changing the shapes from inline to floating doesn't have to change your
document layout - all you have to do is to format the floating shape in a
way that replicates its inline behaviour.

Cheers


"JethroUK©" <reply@the.board> wrote in message
news:G4Keg.648$s4.634@newsfe3-win.ntli.net...
> i gave that a try - but unsuccessfully - i cant float the shapes because
> that changes the whole document - tried bookmarking but to do that i still
> have to 'select' all the shapes first & it took even longer
>
> it did give an idea however - i might just add a border to the shapes as
> they're converted and i think i can check for the border without select
the
> shape
>
> thanks for input
>
>
> "macropod" <invalid@invalid.invalid> wrote in message
> news:4e0clpF1caoqaU1@individual.net...
> > Hi Jethro,
> >
> > You could give each converted shape a unique bookmark, then you'd only
> need
> > to look for shapes that lack one.
> >
> > Alternatively, you could paste the converted ones as Shapes (i.e.
> floating)
> > instead of inline, then you'd only need to look for shapes that are
still
> > inline.
> >
> > Cheers
> >
> >
> > "JethroUK©" <reply@the.board> wrote in message
> > news:Tnseg.3786$002.1167@newsfe2-gui.ntli.net...
> > > i have written some code to convert picture files to metafile:
> > >
> > > Sub CompressPictures()
> > >
> > > Dim x%
> > >
> > > With ActiveDocument.InlineShapes
> > > For x% = 1 To .Count
> > > .Item(x%).Select
> > > Selection.Cut
> > > Selection.PasteSpecial , , wdInLine, ,
> wdPasteMetafilePicture
> > > Next
> > > End With
> > >
> > > End Sub
> > >
> > > i add pictures (screenshots) to the document regularly and would
prefer
> > only
> > > to covert the new pics (bitmaps i think) - but i dont know how to read
> the
> > > picture type before writing it - any ideas?
> > >
> > > InlineShapes.Type ?????
> > >
> > >
> >
> >
>
>



Re: Reading picture types in vba by John

John
Tue May 30 01:00:45 CDT 2006

Hi Macropod,

>format the floating shape in a
>way that replicates its inline behaviour.

Is that actually possible, and if so how? I can - just - imagine writing
code to convert an inline shape to a floating shape with the shape and
the paragraph it's anchored to formatted so as to maintain its previous
position on the page.

But I'm boggling at the thought of formatting a floating shape so it
moves from page to page exactly as an inline shape would when the
surrounding text changes, let alone one that couldn't be nudged out of
alignment by careless mousing.


--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.

Re: Reading picture types in vba by macropod

macropod
Tue May 30 03:37:17 CDT 2006

Hi John,

By setting the floating shape's positioning relative to the paragraph it's
anchored to, via:
.RelativeVerticalPosition = wdRelativeVerticalPositionParagraph
you can make it move with the text.

Of course, there's no preventing the careless user from re-positioning the
shape, but you can at least keep its anchor locked to the intended
paragraph, with:
.LockAnchor = True

Cheers
macropod
[Microsoft Word MVP]


"John Nurick" <j.mapSoN.nurick@dial.pipex.com> wrote in message
news:0ann72to5e3qjfi8lp9p5nnr352qg6gn4h@4ax.com...
> Hi Macropod,
>
> >format the floating shape in a
> >way that replicates its inline behaviour.
>
> Is that actually possible, and if so how? I can - just - imagine writing
> code to convert an inline shape to a floating shape with the shape and
> the paragraph it's anchored to formatted so as to maintain its previous
> position on the page.
>
> But I'm boggling at the thought of formatting a floating shape so it
> moves from page to page exactly as an inline shape would when the
> surrounding text changes, let alone one that couldn't be nudged out of
> alignment by careless mousing.
>
>
> --
> John Nurick [Microsoft Access MVP]
>
> Please respond in the newgroup and not by email.