+ Reply to Thread
Results 1 to 4 of 4

Replace all images into new ones

  1. #1
    Registered User
    Join Date
    08-04-2012
    Location
    Wroclaw, Poland
    MS-Off Ver
    MS Office 2007, 32 bit
    Posts
    2

    Replace all images into new ones

    Hello,

    I am quite fresh to Word VBA object model, therefore my code examples may be far away of proper solution. I will appreciate any help, hint which can help.
    Here is my problem:

    On my Word document I have many pages. On each page I have picture inserted.
    I was able to remove old picture and add new one in the same place where the old was, but only on the first page! I am not able to make it work in multi-pages document

    Here is my routine:
    Please Login or Register  to view this content.
    I've noticed that new pictures are added always on the first page. I believe that 'top' is being measured from the top of the 'current' page.

    I've googled a little bit and found this piece of code:

    Please Login or Register  to view this content.
    but I have no idea how to check the 'pagenumber' of respective shape.

    Moreover I also tried to use anchor:

    Please Login or Register  to view this content.
    But this is also doesn't work...

    To sum up:
    I would like to delete all pictures from all pages (above routines do the job) and add new picture at the same coordinates on the same pages.

    I would REALLY appreciate your any help!
    Last edited by maciej_wroclaw; 08-04-2012 at 07:39 PM.

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,835

    Re: Replace all images into new ones

    Cross-posted at:
    http://www.vbaexpress.com/forum/showthread.php?t=43192
    http://social.msdn.microsoft.com/For...c-ef84fcf98ec4
    http://www.office-forums.com/replace...-t2342302.html
    For cross-posting etiquette, please read RULE 8
    Last edited by macropod; 08-05-2012 at 07:43 PM. Reason: Found another one
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Replace all images into new ones

    Thanks Paul

    Hello maciej_wroclaw, and welcome to the forum.

    Unfortunately you have inadvertently broken one of the forum rules. Please read the following and make the necessary change. Thanks.

    I'm afraid your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

  4. #4
    Registered User
    Join Date
    08-04-2012
    Location
    Wroclaw, Poland
    MS-Off Ver
    MS Office 2007, 32 bit
    Posts
    2

    Re: Replace all images into new ones

    Hello Cutter and Paul

    Thank you for showing me this. I didn't realize that there is such rule.
    Please note that there is an answer for my question, originally posted on: http://social.msdn.microsoft.com/For...?prof=required

    For your convienence I also put here the code which answered my question:

    Please Login or Register  to view this content.
    Once again, apologize for any unconvienenced caused!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1