Opening Word Document using VBA in Access 2013 -


i'm using access 2013 , created button on form open word doc instructions. here's code tried:

private sub cmdhelp_click()     dim wrdapp word.application     dim wrddoc word.document     dim filepath string      set wrdapp = createobject("word.application")     wrdapp.visible = true      filepath = "c:\...\handout.docx"     set wrddoc = wrdapp.documents.open(filepath) end sub 

the problem is, when try compile error on first line says "user-defined type not defined"

please check if set appropriate reference word library in vba environment.

to follow path:

go vba editor >> menu >> tools >> references >>      find on list microsoft word xx.x object library      xx.x highest available number >>  check >> press ok. 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -