Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2013, 04:53 PM
JennEx JennEx is offline Word Document Not Opening With Excel VBA Windows XP Word Document Not Opening With Excel VBA Office 2003
Competent Performer
Word Document Not Opening With Excel VBA
 
Join Date: May 2010
Posts: 162
JennEx is on a distinguished road
Default Word Document Not Opening With Excel VBA

Hope this question is OK here ... it was a toss up between Excel and Word VBA ...



I am using this Excel VBA code to open up a word document (H:/Sun/Ps/Doop/Stes/Turtle/Tue 18-Jun-13/DR_WPE1(14).docx) from excel :

Code:
Set wordapp = CreateObject("word.Application")
wordapp.documents.Open "H:/Sun/Ps/Doop/Stes/Turtle/" & waxon & "/" & flname & "/.docx" 
wordapp.Visible = True
Waxon is a folder name ... Tue 18-Jun-13, and flname = DR_WPE1(14)

The problem .. although Word (the application)opens, there is no document.
Reply With Quote
  #2  
Old 06-20-2013, 05:25 AM
DepricatedZero DepricatedZero is offline Word Document Not Opening With Excel VBA Windows 8 Word Document Not Opening With Excel VBA Office 2007
Novice
 
Join Date: Jun 2013
Posts: 6
DepricatedZero is on a distinguished road
Default

I use "Dim wordApp as Word.Application" rather than "Set wordApp = CreateObject("word.Application")"

May need to add an appropriate reference to do so, I'd give that a try and see if it helps?
Reply With Quote
  #3  
Old 06-20-2013, 10:09 AM
JennEx JennEx is offline Word Document Not Opening With Excel VBA Windows XP Word Document Not Opening With Excel VBA Office 2003
Competent Performer
Word Document Not Opening With Excel VBA
 
Join Date: May 2010
Posts: 162
JennEx is on a distinguished road
Default

Thanks for the suggestion Depricated ...

Turns out it was a simple spelling mistake. "/.docx", should be just ".docx".
Reply With Quote
  #4  
Old 06-20-2013, 10:10 AM
DepricatedZero DepricatedZero is offline Word Document Not Opening With Excel VBA Windows 8 Word Document Not Opening With Excel VBA Office 2007
Novice
 
Join Date: Jun 2013
Posts: 6
DepricatedZero is on a distinguished road
Default

I completely overlooked that hah
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Document Not Opening With Excel VBA Need help opening my important word document HenrikSandstrom Word 1 12-03-2012 03:52 PM
Word Document Not Opening With Excel VBA Problem opening second Word document bTaryag Word 1 08-02-2011 02:48 PM
Get just grey box when opening Excel Document 2010 sebbero Excel 1 11-10-2010 04:24 AM
Word document not opening 7beats Word 2 04-16-2010 12:40 AM
Opening word document problem SPARKY77 Word 4 11-02-2009 01:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft