+ Reply to Thread
Results 1 to 3 of 3

Changing MSWord OLE Paths

  1. #1
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Changing MSWord OLE Paths

    I've taken my project to that 'next level', but am still a rookie at this stuff, and could use any and all help in trying to continue learning. Especially since I can't seem to find to much info on working with MSWord with vba.

    In Excel, I'm working to create a macro that will open word a document, and then change all of of the OLE links in the file (about 70 of them) to the existing Excel document. I've learned in Word you can press Alt-9 to toggle the view between the OLE. I currently then do a global search and replace on the filepath and name.

    And I have worked out how to Open a Word Document and then Save it. But its the middle part on how change the OLE paths.

    I hope that makes sense. Below is my test code (mainly from some samples i found on the web and books) to open and save the file

    Please Login or Register  to view this content.

  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,726

    Re: Changing MSWord OLE Paths

    See the attachment to: http://windowssecrets.com/forums/sho...External-Files. The code there shows how to go about modifying the .LinkFormat.SourceFullName property for each linked object. Although there is also a .LinkFormat.SourcePath property that should in theory be easier to use, in practice I've found it unreliable.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: Changing MSWord OLE Paths

    Thanks Macropod.

    I had read/found that once in the past, but actually could not get it work properly. But anyway, I'm not sure if I'm on the right track or not. I am running the code from Excel, not Word. So unsure if I need to modify to much or not.

    I added this to the code above (in the excel macro) after the save command. But not working just yet.

    The OldPath will always be the same. So think I can just search the word document for that stuff? But does searching a word document search the linked chart, or is pressing Alt-F9 needed first?

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to delete links(paths) from the fomulas after add-on changing?
    By sphinx_ps in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2013, 02:16 PM
  2. Excel changing external link paths! HELP!
    By LangerXXV in forum Excel General
    Replies: 0
    Last Post: 12-15-2011, 11:05 PM
  3. Changing Paths
    By Exsilium in forum Excel General
    Replies: 1
    Last Post: 03-08-2011, 12:24 PM
  4. Problem with a macro changing paths
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2006, 06:35 PM
  5. [SOLVED] MSWORD to EXCEL
    By kmlove in forum Excel General
    Replies: 1
    Last Post: 01-07-2005, 08:06 PM

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