var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Enter Values in Word File
I have a major issue . I need to be able to click on a button in an Access form that will:
1- open an existing word file (location can be a file on the user's computer)
2- enter values from the form into a blank table
3- Save As the document onto the user's desktop
4- and finally email the document to a specified email address.
Is this possible with Access?
All I know is how to open an existing word document :
Shell "winword ""c:\test.doc"""
I would really appreciate your help!!
Thanks! I may have further questions but this is pretty comprehensive
Ok, I'm back with my question.
I wrote the following code to open an existing word document and make changes to it (Document name is Budget Scope):
Dim oWord As Object
Set oWord = CreateObject("Word.Basic")
oWord.FileOpen "C:\Users\ralameh\Documents\Proposal Format\Budget Scope.doc"
oWord.Bookmarks("Country").Range.Text = Me.Country.Value
I got an error saying object doesn't support this property or method. I even replaced Me.Country.Value with "Hi" but it still didn't work.
Ok, I figured it out by myself again
. Or actually copied it from someone online. Thanks Anyway
Dim objWordApp As Object
Dim objWordDoc As Object
'Get pointer to Word Object
Set objWordApp = CreateObject("Word.Application")
'Open the document
Set objWordDoc = objWordApp.Documents.Open("C:\Users\ralameh\Docume nts\Proposal Format\Budget Scope.doc")
'Make Word Instance visible
objWordApp.Visible = True
objWordDoc.Bookmarks("Country").Range.Text = Me.Country.Value
That's what I was talking about
: you need to know the object model of the target application.
Have a nice day!