Re: Hyperlink View Only Word Document
- From: CDMAPoster@xxxxxxxxxxxxxxxx
- Date: Wed, 12 Nov 2008 14:04:56 -0800 (PST)
On Nov 9, 2:40 pm, "Greg (code...@xxxxxxxxx)" <code...@xxxxxxxxx>
wrote:
For the purpose of viewing a document that I would like to modify on
rare occassion using word.
I would like to create a document with MS Word, and then have my
Access Application launch and display the document in a way that
allows the user to view the document, but prohibits the document from
being changed.
I used HyperLink to attempt this, but the Word application is
automatically launched, and the user can alter the document. Also, it
causes my application to minimize, and when Word is exited, my Access
app is still minimized.
Any ideas?
A similar issue came up at the Chicago Access User's Group a couple of
months ago,
http://www.caug.com/caug-worddocmerge.htm
but I have not yet been able to come up with an adequate solution.
The problem that came up was that if I use Automation from within
Access to open an Excel or Word file for some purpose, I'd really like
the user to see what Access is changing while it's happening. The
problem with that is that, depending on what Automation is being done,
if the user accidentally hits some keys or clicks their mouse they may
cause a non-recoverable run-time error. Setting a Word document to
"Read Only" does not mean that it can't be edited. Capturing key
presses and mouse clicks can be problematic even if you have the
handle of the window that contains the controlled app. Adding VBA
code dynamically to the app to capture those events and then deleting
it later just doesn't seem right.
My best lead is the following dll:
Declare Function BlockInput Lib "USER32.dll" ( _
ByVal fBlockIt As Long) As Long
I have not tried it yet, but it seems that it could be a little
dangerous unless your error trapping contains code to make sure your
devices aren't turned off permanently. I.e., don't blame me if you
lock up your computer system. If Automation is used then you also
know when to have your code unblock input. Also, as far as I can
tell, using that DLL does not provide a way to limit the input
blocking to just the app you are controlling.
James A. Fortune
CDMAPoster@xxxxxxxxxxxxxxxx
.
- References:
- Hyperlink View Only Word Document
- From: Greg (codepug@xxxxxxxxx)
- Hyperlink View Only Word Document
- Prev by Date: Re: Table Relationship problem (A2K3) "a related record is required..."
- Next by Date: passing number formatting to documents and email
- Previous by thread: Re: Hyperlink View Only Word Document
- Next by thread: Help for a friend (I don't know where to start!)
- Index(es):
Relevant Pages
|