Q: linking to an embedded Word Doc?

  • Thread starter Thread starter mdas
  • Start date Start date
M

mdas

Hey all,

Currently, I have a help file as a separate Word document. Using a command
button and setting the hyperlink address to the location of the Word doc, I
can get the Word doc to open up. That's what I want. However, I'd like to
embed the Word doc into the access database so I don't have to send out two
files.

Any ideas? I tried using an unbound frame control within a form, but it
doesn't look as nice as when I open up a new Word doc window.

Thanks,
-Mark
 
Hi Mark,

How about inserting the Word document file as OLE Object data type field in
a table? We can create an OLE Object data Type column/filed to contain the
Word document, this way all are in one mdb file.

Hope it helps.



Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


--------------------
| From: "mdas" <[email protected]>
| Subject: Q: linking to an embedded Word Doc?
| Date: Wed, 20 Aug 2003 15:16:02 -0700
| Hey all,
|
| Currently, I have a help file as a separate Word document. Using a command
| button and setting the hyperlink address to the location of the Word doc,
I
| can get the Word doc to open up. That's what I want. However, I'd like to
| embed the Word doc into the access database so I don't have to send out
two
| files.
|
| Any ideas? I tried using an unbound frame control within a form, but it
| doesn't look as nice as when I open up a new Word doc window.
|
| Thanks,
| -Mark
|
|
|
 
Alick

You being a MCSD maybe you can answer something I have
tried and maybe Mark can also use.

When inserting an object it still opens a session of word.

I have tried to insert HTML files which are fine but I
have the same issue it starts a session of IE.

Is there a way to setup a document DOC or HTML to open
within a box in the form, I cant use a text box because
of 255 limitation or memo due to needing to insert
laboratory formulas, tables etc.

Can this be done or am I wasting time. apparently nowone
in this forum has been able to say yes and how to do it
every thing I have been told leads to having a session of
IE or Word open in another windows when I want to keep it
inside a specified area in a form.

Thank you
Xavier
 
Hey, thanks for your reply.

Now how do I point to that document in a click event?

Right now, I can use the wizard to create a button that opens up Word in the
OnClick event (generated code below). How do I get that window to open up
the document in the table?

Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub

Thanks!
-Mark
 
Hi Mark,

We can use the form wizard to bind the ole object data type to a form
field, by default the control will be bound object frame, and then in the
button click event, try the following code, when we click the button, the
embed Word document is opened by a new word instance.

Private Sub Command8_Click()

Dim objwd As Object

Set objwd = OLEBound6.Object.Application

objwd.Visible = True


End Sub



Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


--------------------
| From: "mdas" <[email protected]>
| References: <#[email protected]>
<[email protected]>
| Subject: Re: Q: linking to an embedded Word Doc?
|
| Hey, thanks for your reply.
|
| Now how do I point to that document in a click event?
|
| Right now, I can use the wizard to create a button that opens up Word in
the
| OnClick event (generated code below). How do I get that window to open up
| the document in the table?
|
| Private Sub Command2_Click()
| On Error GoTo Err_Command2_Click
| Dim oApp As Object
| Set oApp = CreateObject("Word.Application")
| oApp.Visible = True
| Exit_Command2_Click:
| Exit Sub
| Err_Command2_Click:
| MsgBox Err.Description
| Resume Exit_Command2_Click
| End Sub
|
| Thanks!
| -Mark
|
|
|
|
|
| | > Hi Mark,
| >
| > How about inserting the Word document file as OLE Object data type field
| in
| > a table? We can create an OLE Object data Type column/filed to contain
the
| > Word document, this way all are in one mdb file.
| >
| > Hope it helps.
| >
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Microsoft Online Partner Support
| >
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| >
| > --------------------
| > | From: "mdas" <[email protected]>
| > | Subject: Q: linking to an embedded Word Doc?
| > | Date: Wed, 20 Aug 2003 15:16:02 -0700
| > | Hey all,
| > |
| > | Currently, I have a help file as a separate Word document. Using a
| command
| > | button and setting the hyperlink address to the location of the Word
| doc,
| > I
| > | can get the Word doc to open up. That's what I want. However, I'd like
| to
| > | embed the Word doc into the access database so I don't have to send
out
| > two
| > | files.
| > |
| > | Any ideas? I tried using an unbound frame control within a form, but
it
| > | doesn't look as nice as when I open up a new Word doc window.
| > |
| > | Thanks,
| > | -Mark
| > |
| > |
| > |
| >
|
|
|
 
Hi Mark,

AFAIK we need to first create the bound object control in order to do what
you want, OLE Object is different from RecordSet Object, and I don't think
the assigning object code will work. Access wraps all OLE objects with its
own proprietary header, the header that Access inserts into the OLE field
is not documented or supported. The header size is variable length, so
there is some limitation when we try to extract object from OLE data
column. It seems what you want to do is to open the help word document when
some event happens (such as click button), this seems like help system,
normally I don't think embedding the help word document in OLE Object data
type is a good idea, once we insert the document, the file header
information is un-reachable. Alternative way is to use a Text field in the
database. The Text field simply stores the path and name of the file. This
will greatly reduce the size of the database as well.

Please feel free to reply to the threads if you have any concerns or
questions.


Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.





--------------------
| From: "mdas" <[email protected]>
| References: <#[email protected]>
<[email protected]>
<[email protected]> Cool, I got that to work. Thanks
alot, Alick!
|
| Now, if I could ask one more thing, is there a way to do this without
first
| creating the bound object frame? I have multiple forms and want the click
| event for each of the help buttons on each of the forms to open up the
same
| document. I though I could just create a sub in a module to open up that
| table, get that object and pass it to a variable of object datatype, but
it
| ain't working out like I had hoped.
|
| My code is below, but it's probably not even close to the right way to do
| it, but at least you can get the gist of what I'm trying to do...
| '==============
| Dim objOLE As BoundObjectFrame
| Dim db As Database
| Dim rs As DAO.Recordset
| Dim objwd As Object
|
| Set db = CurrentDb
| Set rs = db.OpenRecordset("documents")
| rs.MoveFirst
| set objOLE.Object = rs(1) 'errors here. I don't think I'm doing this
| right. rs(1), however, does contain the Word object.
| Set objwd = objOLE.Object.Application
| objwd.Visible = True
| rs.Close
| '============
|
| Again, thanks for all your help,
| -Mark
|
|
| | > Hi Mark,
| >
| > We can use the form wizard to bind the ole object data type to a form
| > field, by default the control will be bound object frame, and then in
the
| > button click event, try the following code, when we click the button,
the
| > embed Word document is opened by a new word instance.
| >
| > Private Sub Command8_Click()
| >
| > Dim objwd As Object
| >
| > Set objwd = OLEBound6.Object.Application
| >
| > objwd.Visible = True
| >
| >
| > End Sub
| >
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Microsoft Online Partner Support
| >
| > Get Secure! - www.microsoft.com/security
| > This posting is provided "as is" with no warranties and confers no
rights.
| >
| >
| > --------------------
| > | From: "mdas" <[email protected]>
| > | References: <#[email protected]>
| > <[email protected]>
| > | Subject: Re: Q: linking to an embedded Word Doc?
| > |
| > | Hey, thanks for your reply.
| > |
| > | Now how do I point to that document in a click event?
| > |
| > | Right now, I can use the wizard to create a button that opens up Word
in
| > the
| > | OnClick event (generated code below). How do I get that window to open
| up
| > | the document in the table?
| > |
| > | Private Sub Command2_Click()
| > | On Error GoTo Err_Command2_Click
| > | Dim oApp As Object
| > | Set oApp = CreateObject("Word.Application")
| > | oApp.Visible = True
| > | Exit_Command2_Click:
| > | Exit Sub
| > | Err_Command2_Click:
| > | MsgBox Err.Description
| > | Resume Exit_Command2_Click
| > | End Sub
| > |
| > | Thanks!
| > | -Mark
| > |
| > |
| > |
| > |
| > |
| > | | > | > Hi Mark,
| > | >
| > | > How about inserting the Word document file as OLE Object data type
| field
| > | in
| > | > a table? We can create an OLE Object data Type column/filed to
contain
| > the
| > | > Word document, this way all are in one mdb file.
| > | >
| > | > Hope it helps.
| > | >
| > | >
| > | >
| > | > Sincerely,
| > | >
| > | > Alick Ye, MCSD
| > | > Microsoft Online Partner Support
| > | >
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | >
| > | > --------------------
| > | > | From: "mdas" <[email protected]>
| > | > | Subject: Q: linking to an embedded Word Doc?
| > | > | Date: Wed, 20 Aug 2003 15:16:02 -0700
| > | > | Hey all,
| > | > |
| > | > | Currently, I have a help file as a separate Word document. Using a
| > | command
| > | > | button and setting the hyperlink address to the location of the
Word
| > | doc,
| > | > I
| > | > | can get the Word doc to open up. That's what I want. However, I'd
| like
| > | to
| > | > | embed the Word doc into the access database so I don't have to
send
| > out
| > | > two
| > | > | files.
| > | > |
| > | > | Any ideas? I tried using an unbound frame control within a form,
but
| > it
| > | > | doesn't look as nice as when I open up a new Word doc window.
| > | > |
| > | > | Thanks,
| > | > | -Mark
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
 
Thanks again Alick. I think you pretty much answered all I need to know.
And yeah, I guess I can always store the link to the document. I just
thought it'd be nice to have everything in one package. In addition, I've
never worked with embedded objects before and thought it'd be nice to learn.

Again, thanks for all your help.
-Mark
 
Glad the information helps. :- )


Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


--------------------
| From: "mdas" <[email protected]>
| References: <#[email protected]>
<[email protected]>
<[email protected]>
|
| Thanks again Alick. I think you pretty much answered all I need to know.
| And yeah, I guess I can always store the link to the document. I just
| thought it'd be nice to have everything in one package. In addition, I've
| never worked with embedded objects before and thought it'd be nice to
learn.
|
| Again, thanks for all your help.
| -Mark
|
|
| | > Hi Mark,
| >
| > AFAIK we need to first create the bound object control in order to do
what
| > you want, OLE Object is different from RecordSet Object, and I don't
think
| > the assigning object code will work. Access wraps all OLE objects with
its
| > own proprietary header, the header that Access inserts into the OLE
field
| > is not documented or supported. The header size is variable length, so
| > there is some limitation when we try to extract object from OLE data
| > column. It seems what you want to do is to open the help word document
| when
| > some event happens (such as click button), this seems like help system,
| > normally I don't think embedding the help word document in OLE Object
data
| > type is a good idea, once we insert the document, the file header
| > information is un-reachable. Alternative way is to use a Text field in
the
| > database. The Text field simply stores the path and name of the file.
This
| > will greatly reduce the size of the database as well.
| >
| > Please feel free to reply to the threads if you have any concerns or
| > questions.
| >
| >
| > Sincerely,
| >
| > Alick Ye, MCSD
| > Product Support Services
| > Microsoft Corporation
| > Get Secure! - <www.microsoft.com/security>
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| >
| >
| >
| >
| > --------------------
| > | From: "mdas" <[email protected]>
| > | References: <#[email protected]>
| > <[email protected]>
| > <[email protected]> Cool, I got that to work. Thanks
| > alot, Alick!
| > |
| > | Now, if I could ask one more thing, is there a way to do this without
| > first
| > | creating the bound object frame? I have multiple forms and want the
| click
| > | event for each of the help buttons on each of the forms to open up the
| > same
| > | document. I though I could just create a sub in a module to open up
that
| > | table, get that object and pass it to a variable of object datatype,
but
| > it
| > | ain't working out like I had hoped.
| > |
| > | My code is below, but it's probably not even close to the right way to
| do
| > | it, but at least you can get the gist of what I'm trying to do...
| > | '==============
| > | Dim objOLE As BoundObjectFrame
| > | Dim db As Database
| > | Dim rs As DAO.Recordset
| > | Dim objwd As Object
| > |
| > | Set db = CurrentDb
| > | Set rs = db.OpenRecordset("documents")
| > | rs.MoveFirst
| > | set objOLE.Object = rs(1) 'errors here. I don't think I'm doing
this
| > | right. rs(1), however, does contain the Word object.
| > | Set objwd = objOLE.Object.Application
| > | objwd.Visible = True
| > | rs.Close
| > | '============
| > |
| > | Again, thanks for all your help,
| > | -Mark
| > |
| > |
| > | | > | > Hi Mark,
| > | >
| > | > We can use the form wizard to bind the ole object data type to a
form
| > | > field, by default the control will be bound object frame, and then
in
| > the
| > | > button click event, try the following code, when we click the
button,
| > the
| > | > embed Word document is opened by a new word instance.
| > | >
| > | > Private Sub Command8_Click()
| > | >
| > | > Dim objwd As Object
| > | >
| > | > Set objwd = OLEBound6.Object.Application
| > | >
| > | > objwd.Visible = True
| > | >
| > | >
| > | > End Sub
| > | >
| > | >
| > | >
| > | > Sincerely,
| > | >
| > | > Alick Ye, MCSD
| > | > Microsoft Online Partner Support
| > | >
| > | > Get Secure! - www.microsoft.com/security
| > | > This posting is provided "as is" with no warranties and confers no
| > rights.
| > | >
| > | >
| > | > --------------------
| > | > | From: "mdas" <[email protected]>
| > | > | References: <#[email protected]>
| > | > <[email protected]>
| > | > | Subject: Re: Q: linking to an embedded Word Doc?
| > | > |
| > | > | Hey, thanks for your reply.
| > | > |
| > | > | Now how do I point to that document in a click event?
| > | > |
| > | > | Right now, I can use the wizard to create a button that opens up
| Word
| > in
| > | > the
| > | > | OnClick event (generated code below). How do I get that window to
| open
| > | up
| > | > | the document in the table?
| > | > |
| > | > | Private Sub Command2_Click()
| > | > | On Error GoTo Err_Command2_Click
| > | > | Dim oApp As Object
| > | > | Set oApp = CreateObject("Word.Application")
| > | > | oApp.Visible = True
| > | > | Exit_Command2_Click:
| > | > | Exit Sub
| > | > | Err_Command2_Click:
| > | > | MsgBox Err.Description
| > | > | Resume Exit_Command2_Click
| > | > | End Sub
| > | > |
| > | > | Thanks!
| > | > | -Mark
| > | > |
| > | > |
| > | > |
| > | > |
| > | > |
| > | > | | > | > | > Hi Mark,
| > | > | >
| > | > | > How about inserting the Word document file as OLE Object data
type
| > | field
| > | > | in
| > | > | > a table? We can create an OLE Object data Type column/filed to
| > contain
| > | > the
| > | > | > Word document, this way all are in one mdb file.
| > | > | >
| > | > | > Hope it helps.
| > | > | >
| > | > | >
| > | > | >
| > | > | > Sincerely,
| > | > | >
| > | > | > Alick Ye, MCSD
| > | > | > Microsoft Online Partner Support
| > | > | >
| > | > | > Get Secure! - www.microsoft.com/security
| > | > | > This posting is provided "as is" with no warranties and confers
no
| > | > rights.
| > | > | >
| > | > | >
| > | > | > --------------------
| > | > | > | From: "mdas" <[email protected]>
| > | > | > | Subject: Q: linking to an embedded Word Doc?
| > | > | > | Date: Wed, 20 Aug 2003 15:16:02 -0700
| > | > | > | Hey all,
| > | > | > |
| > | > | > | Currently, I have a help file as a separate Word document.
Using
| a
| > | > | command
| > | > | > | button and setting the hyperlink address to the location of
the
| > Word
| > | > | doc,
| > | > | > I
| > | > | > | can get the Word doc to open up. That's what I want. However,
| I'd
| > | like
| > | > | to
| > | > | > | embed the Word doc into the access database so I don't have to
| > send
| > | > out
| > | > | > two
| > | > | > | files.
| > | > | > |
| > | > | > | Any ideas? I tried using an unbound frame control within a
form,
| > but
| > | > it
| > | > | > | doesn't look as nice as when I open up a new Word doc window.
| > | > | > |
| > | > | > | Thanks,
| > | > | > | -Mark
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | >
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
 
Back
Top