Unbound Object Frame opens Word in Runtime (1 Viewer)

DNewman

Registered User.
Local time
Today, 19:45
Joined
Oct 12, 2012
Messages
60
I have an Access 2016 application that is being run on some PC's with Access Runtime and some on PC's with full Access.

The application contains a report with an unbound object frame linked to a word document.

When the report is opened on a machine using Runtime Access an instance of MS Word also opens. This problem does not occur when the application is run on machines with full Access.

Any suggestions as to why this happens and how I can stop it!
 

isladogs

MVP / VIP
Local time
Today, 19:45
Joined
Jan 14, 2017
Messages
18,257
Interesting. I've never tried using a frame to link to a Word doc.

If the runtime user already has Word open does another copy of Word open?
If not you may be able to solve using GetObject?

Otherwise can you embed it or replace the frame with a button that when clicked opens the Word doc
 

DNewman

Registered User.
Local time
Today, 19:45
Joined
Oct 12, 2012
Messages
60
Thank you for your reply.

No - I have actually got the users to check that very thing today - if Word is open another instance does not open, so for the minimal inconvenience of having Word open the problem is "solved".

The reason I have linked to a Word document is that the report (which is a letter to clients) contains two generic Rich Text fields that needs to be updated from time to time.

When I had these stored as Long Text in an Access table the report would often contain blank fields (network not fast enough to fill in all the fields??) when it was converted to a PDF - which is the form in which it is emailed out to clients. Replacing the two generic fields with linked Word documents has basically solved that problem(!)

I will investigate your other suggestion.
 

isladogs

MVP / VIP
Local time
Today, 19:45
Joined
Jan 14, 2017
Messages
18,257
Hi again

Not sure if any of this will help but I'll let you decide:

1. GetObject/CreateObject

You could use this in your form

Code:
Dim wordApp       As Object            ' running instance of word

....
'Start Word - if already open
   Set wordApp = GetObject(, "Word.Application")
'If not, creates error 429 - code in error handler is used to open it

....

ErrorHandler:
    If Err.Number = 429 Then 'Outlook is not running; open Outlook with CreateObject
      Set wordApp = CreateObject("Outlook.Application")
      Resume Next
    End If

2. Rich text field issue
Have you considered using a web browser object
This can be show to include rich text, images and hyperlinks to external documents.
For example:



This is the data used in the form web browser object



As you can see from the table, it is pulling image and document paths from the network as part of the output
 

Attachments

  • Capture2.PNG
    Capture2.PNG
    78.1 KB · Views: 218
  • Capture1.PNG
    Capture1.PNG
    46.2 KB · Views: 214

Users who are viewing this thread

Top Bottom