dbTalk Databases Forums  

Document Viewer

comp.databases.ms-access comp.databases.ms-access


Discuss Document Viewer in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Jon Lewis
 
Posts: n/a

Default Re: Document Viewer - 11-23-2010 , 12:18 PM






With Me.OLEUnbound0
.Enabled = True
.Locked = False
.OLETypeAllowed = acOLELinked
.Class = "Word.Document"
.SourceDoc = "C:\Test.doc"
.Action = acOLECreateLink
.SizeMode = acOLESizeClip
Me.cmdExit.SetFocus
.Enabled = False
.Locked = True
End With

Seems to work for me. The control can't get focus so there's no Edit option.

Jon

"Dave G @ K2" <davegriffiths70 (AT) gmail (DOT) com> wrote

Quote:
Have you tried the standard Access Unbound Object Frame?
I've not used it myself but it sounds as though it would work as you want.
There seems to be plenty of Googleable code for it around.

Yes I did, but when the document is visible you can right click over
it which brings up a sub-menu with a way of opening up the doc in
Word. I couldn't find a way of preventing the sub-menu

Dave

Reply With Quote
  #12  
Old   
Dave G @ K2
 
Posts: n/a

Default Re: Document Viewer - 11-30-2010 , 03:34 AM






Jon - thanks for that. Works great and solves everything apart from
one minor issue

The document diplays beautifully but I can't get a scroll bar to
appear.

Any ideas please
Dave


On Nov 23, 6:18*pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com>
wrote:
Quote:
With Me.OLEUnbound0
* * * .Enabled = True
* * * .Locked = False
* * * .OLETypeAllowed = acOLELinked
* * * .Class = "Word.Document"
* * * .SourceDoc = "C:\Test.doc"
* * * .Action = acOLECreateLink
* * * .SizeMode = acOLESizeClip
* * * Me.cmdExit.SetFocus
* * * .Enabled = False
* * * .Locked = True
End With

Seems to work for me. The control can't get focus so there's no Edit option.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in messagenews:097f9157-b104-4221-81e4-fa6d7295192f (AT) a30g2000vbt (DOT) googlegroups.com...



Have you tried the standard Access Unbound Object Frame?
I've not used it myself but it sounds as though it would work as you want.
There seems to be plenty of Googleable code for it around.

Yes I did, but when the document is visible you can right click over
it which brings up a sub-menu with a way of opening up the doc in
Word. I couldn't find a way of preventing the sub-menu

Dave

Reply With Quote
  #13  
Old   
Jon Lewis
 
Posts: n/a

Default Re: Document Viewer - 12-01-2010 , 06:10 AM



Like I say I've not used the control before but I've had a play an I can see
a couple of solutions:

You'll need to size the control to display a full Word page and then have
the control either on a pop up form sized smaller than the control so you
can use the From's scroll bars or on a subform within your main form using
the subform's scroll bars.

One problem I saw was that you do need to explicitly remove focus to disable
the control. Using the subform method I found that even after setting focus
to a control on the main form (although visibly taking effect) diabling the
control wasn't allowed. It seems you have to set focus to another control
on the sub-form.

This might be OK though as you could for example have a little commandbox or
image control with an arrow on top of the OLE control. I say this as it
occurs to me that some of the word docs could be multi-page. This
command/image could when clicked manipulate the SourceItem property of the
OLE control which I belive you can set to a bookmark so you could use this
to jump to any next page.

Be interested to know what your final solution turns out to be.

Jon




"Dave G @ K2" <davegriffiths70 (AT) gmail (DOT) com> wrote

Jon - thanks for that. Works great and solves everything apart from
one minor issue

The document diplays beautifully but I can't get a scroll bar to
appear.

Any ideas please
Dave


On Nov 23, 6:18 pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com>
wrote:
Quote:
With Me.OLEUnbound0
.Enabled = True
.Locked = False
.OLETypeAllowed = acOLELinked
.Class = "Word.Document"
.SourceDoc = "C:\Test.doc"
.Action = acOLECreateLink
.SizeMode = acOLESizeClip
Me.cmdExit.SetFocus
.Enabled = False
.Locked = True
End With

Seems to work for me. The control can't get focus so there's no Edit
option.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:097f9157-b104-4221-81e4-fa6d7295192f (AT) a30g2000vbt (DOT) googlegroups.com...



Have you tried the standard Access Unbound Object Frame?
I've not used it myself but it sounds as though it would work as you
want.
There seems to be plenty of Googleable code for it around.

Yes I did, but when the document is visible you can right click over
it which brings up a sub-menu with a way of opening up the doc in
Word. I couldn't find a way of preventing the sub-menu

Dave

Reply With Quote
  #14  
Old   
Dave G @ K2
 
Posts: n/a

Default Re: Document Viewer - 12-01-2010 , 11:45 AM



Thanks for the ideas Jon

I tried option 1 but couldn't find a way to create a form that was
smaller than a control on the form.

So I'll have a go with subforms a little later

Thanks
Dave

On Dec 1, 12:10*pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com>
wrote:
Quote:
Like I say I've not used the control before but I've had a play an I can see
a couple of solutions:

You'll need to size the control to display a full Word page and then have
the control either on a pop up form sized smaller than the control so you
can use the From's scroll bars or on a subform within your main form using
the subform's scroll bars.

One problem I saw was that you do need to explicitly remove focus to disable
the control. *Using the subform method I found that even after setting focus
to a control on the main form (although visibly taking effect) diabling the
control wasn't allowed. *It seems you have to set focus to another control
on the sub-form.

This might be OK though as you could for example have a little commandboxor
image control with an arrow on top of the OLE control. *I say this as it
occurs to me that some of the word docs could be multi-page. *This
command/image could when clicked manipulate the SourceItem property of the
OLE control which I belive you can set to a bookmark so you could use this
to jump to any next page.

Be interested to know what your final solution turns out to be.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in messagenews:70aae9b1-fe50-4eb1-9f1c-5bde15f1a301 (AT) e20g2000vbn (DOT) googlegroups.com...
Jon - thanks for that. Works great and solves everything apart from
one minor issue

The document diplays beautifully but I can't get a scroll bar to
appear.

Any ideas please
Dave

On Nov 23, 6:18 pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com
wrote:

With Me.OLEUnbound0
.Enabled = True
.Locked = False
.OLETypeAllowed = acOLELinked
.Class = "Word.Document"
.SourceDoc = "C:\Test.doc"
.Action = acOLECreateLink
.SizeMode = acOLESizeClip
Me.cmdExit.SetFocus
.Enabled = False
.Locked = True
End With

Seems to work for me. The control can't get focus so there's no Edit
option.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:097f9157-b104-4221-81e4-fa6d7295192f (AT) a30g2000vbt (DOT) googlegroups.com...

Have you tried the standard Access Unbound Object Frame?
I've not used it myself but it sounds as though it would work as you
want.
There seems to be plenty of Googleable code for it around.

Yes I did, but when the document is visible you can right click over
it which brings up a sub-menu with a way of opening up the doc in
Word. I couldn't find a way of preventing the sub-menu

Dave

Reply With Quote
  #15  
Old   
Jon Lewis
 
Posts: n/a

Default Re: Document Viewer - 12-02-2010 , 04:34 AM



I didn't mean the form itself, I meant the form's window. As soon as you
make the window smaller than the form, scroll bars appear.

Jon

"Dave G @ K2" <davegriffiths70 (AT) gmail (DOT) com> wrote

Thanks for the ideas Jon

I tried option 1 but couldn't find a way to create a form that was
smaller than a control on the form.

So I'll have a go with subforms a little later

Thanks
Dave

On Dec 1, 12:10 pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com>
wrote:
Quote:
Like I say I've not used the control before but I've had a play an I can
see
a couple of solutions:

You'll need to size the control to display a full Word page and then have
the control either on a pop up form sized smaller than the control so you
can use the From's scroll bars or on a subform within your main form using
the subform's scroll bars.

One problem I saw was that you do need to explicitly remove focus to
disable
the control. Using the subform method I found that even after setting
focus
to a control on the main form (although visibly taking effect) diabling
the
control wasn't allowed. It seems you have to set focus to another control
on the sub-form.

This might be OK though as you could for example have a little commandbox
or
image control with an arrow on top of the OLE control. I say this as it
occurs to me that some of the word docs could be multi-page. This
command/image could when clicked manipulate the SourceItem property of the
OLE control which I belive you can set to a bookmark so you could use this
to jump to any next page.

Be interested to know what your final solution turns out to be.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:70aae9b1-fe50-4eb1-9f1c-5bde15f1a301 (AT) e20g2000vbn (DOT) googlegroups.com...
Jon - thanks for that. Works great and solves everything apart from
one minor issue

The document diplays beautifully but I can't get a scroll bar to
appear.

Any ideas please
Dave

On Nov 23, 6:18 pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com
wrote:

With Me.OLEUnbound0
.Enabled = True
.Locked = False
.OLETypeAllowed = acOLELinked
.Class = "Word.Document"
.SourceDoc = "C:\Test.doc"
.Action = acOLECreateLink
.SizeMode = acOLESizeClip
Me.cmdExit.SetFocus
.Enabled = False
.Locked = True
End With

Seems to work for me. The control can't get focus so there's no Edit
option.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:097f9157-b104-4221-81e4-fa6d7295192f (AT) a30g2000vbt (DOT) googlegroups.com...

Have you tried the standard Access Unbound Object Frame?
I've not used it myself but it sounds as though it would work as you
want.
There seems to be plenty of Googleable code for it around.

Yes I did, but when the document is visible you can right click over
it which brings up a sub-menu with a way of opening up the doc in
Word. I couldn't find a way of preventing the sub-menu

Dave

Reply With Quote
  #16  
Old   
Dave G @ K2
 
Posts: n/a

Default Re: Document Viewer - 12-02-2010 , 09:21 AM



Jon

Apologies if I'm being thick but I'm not with you. All I have is a
form with an Unbound Object Frame on it. What do you mean by the
form's window?

Dave

On Dec 2, 10:34*am, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com>
wrote:
Quote:
I didn't mean the form itself, I meant the form's window. *As soon as you
make the window smaller than the form, scroll bars appear.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in messagenews:5f016724-f8cd-4000-b0cd-8b8317a04cae (AT) v23g2000vbi (DOT) googlegroups.com...
Thanks for the ideas Jon

I tried option 1 but couldn't find a way to create a form that was
smaller than a control on the form.

So I'll have a go with subforms a little later

Thanks
Dave

On Dec 1, 12:10 pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com
wrote:

Like I say I've not used the control before but I've had a play an I can
see
a couple of solutions:

You'll need to size the control to display a full Word page and then have
the control either on a pop up form sized smaller than the control so you
can use the From's scroll bars or on a subform within your main form using
the subform's scroll bars.

One problem I saw was that you do need to explicitly remove focus to
disable
the control. Using the subform method I found that even after setting
focus
to a control on the main form (although visibly taking effect) diabling
the
control wasn't allowed. It seems you have to set focus to another control
on the sub-form.

This might be OK though as you could for example have a little commandbox
or
image control with an arrow on top of the OLE control. I say this as it
occurs to me that some of the word docs could be multi-page. This
command/image could when clicked manipulate the SourceItem property of the
OLE control which I belive you can set to a bookmark so you could use this
to jump to any next page.

Be interested to know what your final solution turns out to be.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:70aae9b1-fe50-4eb1-9f1c-5bde15f1a301 (AT) e20g2000vbn (DOT) googlegroups.com...
Jon - thanks for that. Works great and solves everything apart from
one minor issue

The document diplays beautifully but I can't get a scroll bar to
appear.

Any ideas please
Dave

On Nov 23, 6:18 pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com
wrote:

With Me.OLEUnbound0
.Enabled = True
.Locked = False
.OLETypeAllowed = acOLELinked
.Class = "Word.Document"
.SourceDoc = "C:\Test.doc"
.Action = acOLECreateLink
.SizeMode = acOLESizeClip
Me.cmdExit.SetFocus
.Enabled = False
.Locked = True
End With

Seems to work for me. The control can't get focus so there's no Edit
option.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:097f9157-b104-4221-81e4-fa6d7295192f (AT) a30g2000vbt (DOT) googlegroups.com...

Have you tried the standard Access Unbound Object Frame?
I've not used it myself but it sounds as though it would work as you
want.
There seems to be plenty of Googleable code for it around.

Yes I did, but when the document is visible you can right click over
it which brings up a sub-menu with a way of opening up the doc in
Word. I couldn't find a way of preventing the sub-menu

Dave

Reply With Quote
  #17  
Old   
Jon Lewis
 
Posts: n/a

Default Re: Document Viewer - 12-06-2010 , 04:42 AM



Open the form in design mode and then drag the borders so the form is only
partially showing. Explicitly save changes (Access won't prompt when you
close the form if that's all you've done). You now have a form whose window
is not big enough to fully display it so scroll bars should appear.

Jon



"Dave G @ K2" <davegriffiths70 (AT) gmail (DOT) com> wrote

Jon

Apologies if I'm being thick but I'm not with you. All I have is a
form with an Unbound Object Frame on it. What do you mean by the
form's window?

Dave

On Dec 2, 10:34 am, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com>
wrote:
Quote:
I didn't mean the form itself, I meant the form's window. As soon as you
make the window smaller than the form, scroll bars appear.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:5f016724-f8cd-4000-b0cd-8b8317a04cae (AT) v23g2000vbi (DOT) googlegroups.com...
Thanks for the ideas Jon

I tried option 1 but couldn't find a way to create a form that was
smaller than a control on the form.

So I'll have a go with subforms a little later

Thanks
Dave

On Dec 1, 12:10 pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com
wrote:

Like I say I've not used the control before but I've had a play an I can
see
a couple of solutions:

You'll need to size the control to display a full Word page and then
have
the control either on a pop up form sized smaller than the control so
you
can use the From's scroll bars or on a subform within your main form
using
the subform's scroll bars.

One problem I saw was that you do need to explicitly remove focus to
disable
the control. Using the subform method I found that even after setting
focus
to a control on the main form (although visibly taking effect) diabling
the
control wasn't allowed. It seems you have to set focus to another
control
on the sub-form.

This might be OK though as you could for example have a little
commandbox
or
image control with an arrow on top of the OLE control. I say this as it
occurs to me that some of the word docs could be multi-page. This
command/image could when clicked manipulate the SourceItem property of
the
OLE control which I belive you can set to a bookmark so you could use
this
to jump to any next page.

Be interested to know what your final solution turns out to be.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:70aae9b1-fe50-4eb1-9f1c-5bde15f1a301 (AT) e20g2000vbn (DOT) googlegroups.com...
Jon - thanks for that. Works great and solves everything apart from
one minor issue

The document diplays beautifully but I can't get a scroll bar to
appear.

Any ideas please
Dave

On Nov 23, 6:18 pm, "Jon Lewis" <jon.le... (AT) cutthespambtinternet (DOT) com
wrote:

With Me.OLEUnbound0
.Enabled = True
.Locked = False
.OLETypeAllowed = acOLELinked
.Class = "Word.Document"
.SourceDoc = "C:\Test.doc"
.Action = acOLECreateLink
.SizeMode = acOLESizeClip
Me.cmdExit.SetFocus
.Enabled = False
.Locked = True
End With

Seems to work for me. The control can't get focus so there's no Edit
option.

Jon

"Dave G @ K2" <davegriffith... (AT) gmail (DOT) com> wrote in
messagenews:097f9157-b104-4221-81e4-fa6d7295192f (AT) a30g2000vbt (DOT) googlegroups.com...

Have you tried the standard Access Unbound Object Frame?
I've not used it myself but it sounds as though it would work as you
want.
There seems to be plenty of Googleable code for it around.

Yes I did, but when the document is visible you can right click over
it which brings up a sub-menu with a way of opening up the doc in
Word. I couldn't find a way of preventing the sub-menu

Dave

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.