Download sample file at: www.iaccessworld.com/downloads... Open MS word file from MS Access using VBA Next: fill in word with data from Access • Fill in Word with data...
Пікірлер: 46
@Posh19579 жыл бұрын
Thank you SO much! Extremely helpful and right on time for a "Non-Programmer" like myself!!!
@ammarsadiq Жыл бұрын
I'm looking for help to create a template. I have 5 different Word files that I'd like to be accessible through buttons in an Access database. The buttons should open specific pages in the Word files for editing and printing. Additionally, I'd like to keep a record of all my prints in a database. Is there anyone who can assist me with this?"
@richardmeborg4717 Жыл бұрын
Hi,I have a Access database, where I have Excel files for Accounts. I can't make it right to open the Excel file from Access via Button and VBA. Can you help me here?
@MaxiSatan9 жыл бұрын
8:55 is that somebody dying in the background? Anyway great vids, helped me a lot with my Access job
@dragonR769 жыл бұрын
Great tutorial! I'm learning so much from your videos. I do have a question though. Is there a way to create multiple buttons to open up different word docs on the same form. For example, I have a button to open a particular word doc but I want to create another button to open up a different word doc. Its looks like there is an argument between the two.
@austin724069 жыл бұрын
yes, you need to copy the code from the first buttong and paste it under another button then change the code to open different doc like file name, location and the field name on another doc.
@dragonR769 жыл бұрын
austin72406 I got it to work. Thanks. I was getting an "ambiguous name" message when I did the copy and paste but all I had to do was rename the fillwordform to fillwordfowm1. I was also wondering how, if possible, can you do checkboxes the same way as your tutorial for text into word? I have the text importing into word but I have checkbox that I want to import as well.
@Dxsoftsynth2 жыл бұрын
hello and thank you for this.. can i do this on a multiple buttons? and also can i do this on the sub forms? i try to do this on onother button but i shows blank MS word
@danielkim31075 жыл бұрын
Is there a way to write an error handler to show a msgbox "document not found" if a blank word document pops up?
@aspirantspoint5174 жыл бұрын
How to create new word document and and after editing save the same file as object in Ms access for future reference /record
@gamerdude20388 жыл бұрын
Hallo Austin, very good video, i did all the code, adding the location of my doc file, but when i run it, it opens me on ly word, showing nothing, and all panels inactive. Can u assist me? Thanks!
@f.ginting88335 жыл бұрын
Hello, Can you help me find a way so when i click the button on my form to open the ms word, it doesn't open in read-only mode, Thanks !
@vaattooooo10 жыл бұрын
thanks it helped me a lot. but now i have variable paths. so i cant type the path in vba. can you help me?
@amaliehayati39365 жыл бұрын
Anyone help me I’ve done it but the question is how to create another button and select link it to another fine in the same form
@nonowater2967 Жыл бұрын
How to make the home button, so i can copy document from ms word and save to ms access in home button, thank's before sir 🙏
@toksu_project5 жыл бұрын
I successfully followed it but why is ms.word in read-only mode?
@abdulhamidalhaddadi22552 жыл бұрын
Thank you
@lloydpoole17878 жыл бұрын
I have done the code and it works well but the documents is in a blinking word icon on the task bar and then I click on it to display the document can I open the document straight away???
@austin724068 жыл бұрын
the document is already open by VBA code in Access, but it is not on your current application that you're using, so it shows as blinking word icon on the task bar. you just click that icon to view the word.
@tariqsaado70009 жыл бұрын
I'm getting this error message. I'm using Access 2007. Can you help with this. The expression On Click you entered as the event property setting produced the following error: A problem occurred while Microsoft Access as communicating with the OLE server of ActiveX Control.
@austin724069 жыл бұрын
do you set the reference to MS Word?
@tariqsaado70009 жыл бұрын
yes i did.
@tariqsaado70009 жыл бұрын
Here is the code. i don't know if i missed something: Function openword(conPath As String) Dim appword As Word.Application Dim doc As Word.Document On Error Resume Next Error.Clear Set appword = GetObject(, "word.Application") If Error.Number o Then Set appword = New Word.Application appword.Visible = True End If Set doc = appword.Documents.Open(conPath, , True) appword.Activate Set doc = Nothing Set appword = Nothing End Function Private Sub Command22_Click() Dim mydoc As String mydoc = "C:\Documents and Settings\TOSHIBA\My Documents\Custice\kund avtal.docx" Call openword(mydoc) End Sub
@sokhphally3 жыл бұрын
What about Excel? sir
@TheReyray9 жыл бұрын
is there a way to open a WORD doc in a form/subform? I would like to open a word doc from a form with dropdowns for document name, section name/number or hyperlink. the dicument could be searched by section or hyperlink. thanks.
@austin724069 жыл бұрын
you can create a table for list of document name and have field for the address of that word document. now when you select document from a drowload then will open the word document.
@TheReyray9 жыл бұрын
austin72406 I have a table of document names and a table of links (to bookmarks in the document) I can get the file to open separately in msword but i want it to open it in the form itself. thanks , i hope this clears it up
@barwnoss9 жыл бұрын
My word file is connected with access (Mail Merge). With your code i open the word file but i cannot use mail Merge. Do you have any solution?
@DHCross8 жыл бұрын
I'd love to hear an answer to this
@jeffrey69798 жыл бұрын
Mine opens a new blank word doc any help? Please and thank you.
@austin724068 жыл бұрын
many reasons can happen. good thing at least it opens MS word. next step to make sure code is to open your word file at the correct location/file path.
@soufianeelhabti49706 жыл бұрын
+austin72406 how can we open any file that we upload in database .... not just one file like your case (your file : Query ....etc)
@ralphanthony268310 жыл бұрын
When I click the button the button does nothing. Can you assist?
@austin7240610 жыл бұрын
can you upload your code here? I will take a look.
@ralphanthony268310 жыл бұрын
austin72406 Option Compare Database Function openword(conPath As String) Dim appword As Word.Application Dim doc As Word.Document On Error Resume Next Error.Clear Set appword = GetObject(, "word.application") If Err.Number 0 Then Set appword = New Word.Application appword.Visible = True End If Set doc = appword.Documents.Open(conPath, , True) appword.Activate Set doc = Nothing Set appword = Nothing End Function Private Sub Command24_Click() Dim mydoc As String mydoc = "D:\2014 Inspections\To Be Sorted\Main Inspection Form.docx" Call openword(mydoc) End Sub
@ralphanthony268310 жыл бұрын
austin72406 Thats the code I have entered same from your video. I save it open form and when I click the button nothing happens at all. I don't know what step I missed I dont even get error message.
@austin7240610 жыл бұрын
I tested your code with my file location. It works. Maybe you need to do Compact and Repair file.