UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Opening Word From Access, Access 2016    
 
   
aoh
post May 21 2020, 06:26 AM
Post#1



Posts: 1,429
Joined: 20-February 04
From: Dublin, Ireland


Hi guys,

Have a bit of a weird problem. One computer in a network has been having difficulties since yesterday.

I had to go in and reset all the file type associations for the office programs and now, for Access and Excel, when you browse to a document, it shows the correct icon for that file type. However, Word documents show an icon that looks to be notepad, but will open in Word when double-clicked.

My database opens Word documents with a simple line of code:
CODE
Application.FollowHyperlink Me.txtFile, , True


Me.txtFile holds the full path to the file. On this one machine (and only this machine), I get the security message "Some files contain viruses... Would you like to open this file?". I say OK and then get "No program is registered to open this file". If I browse to that specific file, I can open it. And yes, the location is in Trusted Locations in Word.

This morning, I uninstalled Office 365, rebooted and reinstalled and it's still the same.

Any ideas?

--------------------
Anne

Experience is a wonderful thing. It enables you to recognize a mistake when you've just made it again.
Go to the top of the page
 
nuclear_nick
post May 21 2020, 06:57 AM
Post#2



Posts: 1,872
Joined: 5-February 06
From: Ohio, USA


Could you try instead using a 'Word Object' and opening the file using said Word object? Bit of a pain, but that may bypass Word security features? It also may be that you're opening a 'macro enabled' word file? I've not encountered my users having this problem (yet) because that's the way I did it before discovering the 'application hyperlink', so I just always do it that way anyway.

--------------------
"Nuclear" Nick
____________
The top three reasons to hide code; 1) It's not your own. 2) It's your own, but it's so crappy you don't want anyone to see it. 3) The comments in your code would get you in a lot of trouble if ever made public.
Go to the top of the page
 
aoh
post May 21 2020, 07:05 AM
Post#3



Posts: 1,429
Joined: 20-February 04
From: Dublin, Ireland


Hi Nick,

Probably could - and will do over the weekend if needs be, but it just looks like the whole Office installation has got corrupted. Also weird that it's just 1 machine when there are 6 or 7 in that office running the same code.

--------------------
Anne

Experience is a wonderful thing. It enables you to recognize a mistake when you've just made it again.
Go to the top of the page
 
nuclear_nick
post May 21 2020, 07:10 AM
Post#4



Posts: 1,872
Joined: 5-February 06
From: Ohio, USA


There might be settings the user has that you don't know about as well. Sorry I don't know what those could be... but there could be something. And it might be something that is corrected in a re-install, too.

Always something, ain't it? smile.gif

--------------------
"Nuclear" Nick
____________
The top three reasons to hide code; 1) It's not your own. 2) It's your own, but it's so crappy you don't want anyone to see it. 3) The comments in your code would get you in a lot of trouble if ever made public.
Go to the top of the page
 
BruceM
post May 21 2020, 07:13 AM
Post#5


UtterAccess VIP
Posts: 8,135
Joined: 24-May 10
From: Downeast Maine


This article by Daniel Pineault may be of interest. I have been using ExecuteFile for years with no problems.

Important note: The ShellExecute API code in the article will work only with 32 bit Access. If all installations are Access 2010 or later you should use the VBA 7 version as shown here. Note that the PtrSafe declaration and LongPtr variables work equally well with 32 and 64 bit installations of Office 2010, which is when VBA 7 was introduced. Earlier versions of Access, with VBA 6 and earlier, do not recognize PtrSafe and LongPtr. There is a way around that (conditional compilation). I can provide a link if necessary.
Go to the top of the page
 
nuclear_nick
post May 21 2020, 08:06 AM
Post#6



Posts: 1,872
Joined: 5-February 06
From: Ohio, USA


@BruceM

It was certainly of use to me... I liked it... Thanks!

hat_tip.gif

--------------------
"Nuclear" Nick
____________
The top three reasons to hide code; 1) It's not your own. 2) It's your own, but it's so crappy you don't want anyone to see it. 3) The comments in your code would get you in a lot of trouble if ever made public.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    6th July 2020 - 03:12 PM