Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2023, 09:17 AM
MartinGM MartinGM is offline Opening a document with links - from VBA Windows 11 Opening a document with links - from VBA Office 2021
Advanced Beginner
Opening a document with links - from VBA
 
Join Date: May 2023
Location: England
Posts: 66
MartinGM is on a distinguished road
Default Opening a document with links - from VBA

When I open a Word document with links (for instance a mailmerge) I get a dialog "Yes" or "No" to allow SQL access. I select "Yes" and away I go.



When I open the same document from VBA it opens without showing the dialog, having assumed that the answer is "No". Then I can't do anything with the document.

Is there a way from VBA to open the document to the dialog so that I can answer the question as "Yes" ?

Or is there another workaround to open the document with SQL access ?

Many thanks
Reply With Quote
  #2  
Old 12-19-2023, 09:50 AM
Charles Kenyon Charles Kenyon is offline Opening a document with links - from VBA Windows 11 Opening a document with links - from VBA Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I turn the document into a non-mailmerge document before saving and closing it. Then, the vba to open changes it back to a letter mailmerge prlimary and attaches the data source.
Reply With Quote
  #3  
Old 12-19-2023, 11:05 AM
MartinGM MartinGM is offline Opening a document with links - from VBA Windows 11 Opening a document with links - from VBA Office 2021
Advanced Beginner
Opening a document with links - from VBA
 
Join Date: May 2023
Location: England
Posts: 66
MartinGM is on a distinguished road
Default

Thanks Charles - I'll try that workaround
Reply With Quote
  #4  
Old 12-23-2023, 11:55 AM
MartinGM MartinGM is offline Opening a document with links - from VBA Windows 11 Opening a document with links - from VBA Office 2021
Advanced Beginner
Opening a document with links - from VBA
 
Join Date: May 2023
Location: England
Posts: 66
MartinGM is on a distinguished road
Default

Hi,
I've looked, but cannot find how to . .
"Then, the vba to open changes it back to a letter mailmerge prlimary and attaches the data source."
Could you point me at appropriate instructions please ?
Thank you,
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
A few links opening incorrectly dsrt16 PowerPoint 0 07-19-2023 10:47 AM
How to to automatically update Word links with Mail Merge, when opening Word file from Excel? soroush.kalantari Word VBA 1 05-23-2023 11:36 PM
Opening a document with links - from VBA VBA Code to prevent word document trying to open links at opening John Pryor Word VBA 4 07-17-2018 01:51 AM
Opening a document with links - from VBA Can links move with the document? Fabulist Word 17 01-27-2018 03:46 AM
Opening a word doc without opening all attached links/reference Nicobisgaard Word 9 07-21-2015 08:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft