Microsoft Word Application Error
Contents |
360 games PC games word compile error in hidden module link mac Windows games Windows phone games Entertainment All Entertainment compile error in hidden module word mac Movies & TV Music Business & Education Business Students & educators microsoft word compile error in hidden module link mac Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet compile error in hidden module word 2016 mac Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All
Microsoft Visual Basic For Applications Compile Error In Hidden Module Excel 2013
Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 20 Oct 2016 16:52:38 GMT by s_wx1085 (squid/3.5.20)
360 games PC games https://support.microsoft.com/en-us/kb/307410 Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators http://stackoverflow.com/questions/11728899/user-defined-type-not-defined-controlling-word-from-excel Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet compile error Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All compile error in Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up User defined type not defined- controlling Word from Excel up vote 0 down vote favorite I am trying to do some relatively simple copy and pasting from Excel 2007 into Word 2007. I've looked through this site and others, and keep getting hung up on the same thing- the third line n the code below keeps giving me the "User type note defined" error msg. I am really confused since I just lifted this from another solution (and had similar issues with other solutions I tried to lift). Could someone please educate me on what is causing the error, and why? Sub ControlWord() ' **** The line below gives me the error **** Dim appWD As Word.Application ' Create a new instance of Word & make it visible Set appWD = CreateObject("Word.Application.12") appWD.Visible = True 'Find the last row with data in the spreadsheet FinalRow = Range("A9999").End(xlUp).Row For i = 1 To FinalRow ' Copy the current row Worksheets("Sheet1").Rows(i).Copy ' Tell Word to create a new document appWD.Documents.Add ' Tell Word to paste the contents of the clipboard into the new document appWD.Selection.Paste ' Save the new document with a sequential file name appWD.ActiveDocument.SaveAs Filename:="File" & i ' Close this new word document appWD.ActiveDocument.Close Next i ' Close the Word application appWD.Quit End Sub excel vba excel-vba ms-word excel-2007 share|improve this question edited Jul 31 '12 at 17:36 SeanC 11.2k52045 asked Jul 30 '12 at 20:13 Tommy Z 1325716 6 You need to set a reference to the Word library in your project (you can do that in the VB editor under Tools>>References) –Tim Williams Jul 30 '12 at 20:18 thanks Tim- never done that before. –Tommy Z Jul 30 '12 at 20:32 worked perfectly, thank you! –Tommy Z Jul 30 '12 at 20:33 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote This answer was mentioned in a comment by Tim Williams. In order to solve this problem, you have to add the Word object libra