#1
|
|||
|
|||
VBA Code to prevent word document trying to open links at opening
Hi There,
I am new here. I am pulling together a report template for my work, which encompasses around 200 links to an excel source documents. Notwithstanding that I have unticked the relevant box in the File/Options menu, frustratingly, the document still attempts to update links. All links are set to 'manual'. The document will be opened by different users, some of whom will not have access to the excel, so wont be able to have the excel open first. As such, I wondered if some form of Document Open VBA code might work as an alternative workaround? Appreciate any guidance. Cheers, John |
#2
|
||||
|
||||
Press Alt-F9 to expose the field codes and ensure the \a switch is deleted from all your LINK fields.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks Macropod. I have tried all the basics. Sadly, the document takes over a minute to load with no /a references.
I believe it may be an issue when using a server (as opposed to C Drive) but am not sure. Is there any code that you can think of that might help suppress this annoying behaviour. |
#4
|
||||
|
||||
MS used to have a Knowledge Base article on this (https://support.microsoft.com/en-us/kb/970154) but it seems to have been deleted. For the article's registry patch to reduce such delays:
1. Start Registry Editor. In Windows 10, go to Windows System> Run, then type regedit in the Run box, and then press ENTER. If you are prompted for an administrator password or for confirmation, type the password, or provide confirmation. 2. Locate and then select the following registry subkey: Code:
HKEY_CURRENT_USER\Software\Microsoft\Office\#\Word\Options Code:
• Office 2007 - HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\Options • Office 2010 - HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options • Office 2013 - HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Options • Office 2016 - HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Word\Options 4. Type DelayOleSrvParseDisplayName, and then press ENTER. 5. Right-click DelayOleSrvParseDisplayName, and then click Modify. 6. In the Value data box, type 1, and then click OK. 7. On the Edit menu, point to New, and then click DWORD Value. 8. Type NoActivateOleLinkObjAtOpen, and then press ENTER. 9. Right-click NoActivateOleLinkObjAtOpen, and then click Modify. 10. In the Value data box, type 1, and then click OK. 11. On the File menu, click Exit to exit Registry Editor.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thanks Macropod. You are very kind.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why vba code stops working after a document open command? | eduzs | Word VBA | 1 | 08-23-2017 03:02 PM |
Opening a word doc without opening all attached links/reference | Nicobisgaard | Word | 9 | 07-21-2015 08:49 AM |
Error message opening a document in Word "Word cannot open this file because it is larger than 512 M | poonamshedge | Word | 2 | 09-11-2014 06:11 AM |
Open hyperlinks upon opening document | xpgmmsb1 | Word | 0 | 10-07-2011 08:54 AM |
VB code from one document runs on other open documents | beav_35 | Word VBA | 0 | 11-10-2010 02:52 PM |