|
|
|
date: Tue, 8 Apr 2008 10:05:02 -0700 (PDT),
group: microsoft.public.word.vba.beginners
back
Re: remove image from file with vba
ok, thx this works!!!
and last questions, with vba i cant know the name of my inline
picture, (by example my_pict.jpg?)
On 8 abr, 18:23, "Jonathan West" wrote:
> wrote in message
>
> news:e5580d3c-e628-4e61-98a1-a9d29d015f5e@a70g2000hsh.googlegroups.com...
>
>
>
> > On 8 abr, 13:30, "Jonathan West" wrote:
> >> wrote in message
>
> >>news:585e5960-388a-4176-8de6-f81364edc59e@8g2000hsu.googlegroups.com...
>
> >> > hello, any know how I can remove a picture from file (.doc) with vba
> >> > code??
> >> > ( i dont know the name of picture to remove)
>
> >> > thx in adv.
>
> >> You need some means of identifying the picture. Is it "floating" or
> >> "inline"? The method required is different in the two cases. Is the
> >> picture
> >> the only one in the document? If not, what method is available to work
> >> out
> >> which is the right one? Is it the only one on the first page for
> >> instance?
>
> >> Once you have a completely unmistakable way of identifying the right
> >> picture, it is not hard to delete it. But we need to work first on
> >> identifying it.
>
> >> --
> >> Regards
> >> Jonathan West - Word MVPwww.intelligentdocuments.co.uk
> >> Please reply to the newsgroup
>
> > thx.
>
> > -My picture is inline
> > -Is the only one Picture in my document.
> > - Only in the first page.
>
> In that case, one line of code will remove the picture, as follows
>
> ActiveDocument.Range.InlineShapes(1).Delete
>
> --
> Regards
> Jonathan West - Word MVPwww.intelligentdocuments.co.uk
> Please reply to the newsgroup
date: Tue, 8 Apr 2008 15:28:57 -0700 (PDT)
author: unknown
|
|