PDA

Click to See Complete Forum and Search --> : [RESOLVED] ms access/ vba display ms word preview window


bambo
Jul 10th, 2006, 08:09 AM
I was wondering how could you display a preview window of an ms word document from within ms access application.

I'd like to create word documents based on variables from my access database without needing to go from ms access window to ms word windows which gets messy once you want to preview different word docs.

any ideas?

Static
Jul 10th, 2006, 08:14 AM
stick an unbound object frame in your form. Access will prompt you for what you want in it.. pick MS Word Doc...

does that help?

bambo
Jul 10th, 2006, 09:31 AM
sure, but how do you program the unbound object control to display a filename variable. meaning something like (this doesnt work) :

Private Sub Filename_Click()
me.unbound_object.SOURCEFILE = me.filename
me.unbound_object.requery
End Sub

Static
Jul 10th, 2006, 09:57 AM
couldnt get it to work either.. sorry. never tried it before.

bambo
Jul 10th, 2006, 09:58 AM
you can think of it better as a "MS Word File Viewer" - when you press a certain file name, this file content will show in the object frame.

any ideas?

bambo
Jul 10th, 2006, 10:04 AM
I don't think it should be with a unbound object ,but rather with a bound object. but question is how do you program a bound object?

RobDog888
Jul 10th, 2006, 12:07 PM
You could import a richtextbox vb6 control to your access form but you would also need to distribute the ocx with yoiur db. Then you can display the document contents in the rtb.

bambo
Jul 10th, 2006, 02:34 PM
1. how do I import a control from vb6?
2. is there no way I can program a bound object control?