Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-06-2013, 12:51 PM
PosseJohn PosseJohn is offline Need Help With Opening a Word Document Windows 7 32bit Need Help With Opening a Word Document Office 2010 32bit
Novice
Need Help With Opening a Word Document
 
Join Date: Jul 2011
Posts: 20
PosseJohn is on a distinguished road
Default Need Help With Opening a Word Document

Need Help With Opening a Word Document from Access AND having Document_Open() activate automatically AND having the file available for editing/saving.



I have tried the following, but the document opens as a READ-ONLY file and VBA is NOT enabled or prompted for.

I need the file to open for editing & saving, and with VBA enabled automatically.

Code:
Private Sub cmdTO_Click()
    On Error Resume Next
 
    Dim Webtarget As String
    Dim wdObj As Object
    Dim wdDoc As Object
    'Must enable the Microsoft Word 14.0 Object Library from the Tools menu, References.
 
    Webtarget = "\\...\ShiftTurnover\U1TO.docm"
 
    Set wdObj = CreateObject("Word.Application")
    wdObj.Visible = True
    wdObj.Activate
    Set wdDoc = wdObj.Documents.Open(Webtarget)
 
    DoCmd.SetWarnings True
 
End Sub
Is there more to the .Documents.Open(___) syntax to allow opening for editing and macro enabling?

Your help is GREATLY appreciated.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help With Opening a Word Document Word Document Not Opening With Excel VBA JennEx Word VBA 3 06-20-2013 10:10 AM
Need Help With Opening a Word Document Need help opening my important word document HenrikSandstrom Word 1 12-03-2012 03:52 PM
Need Help With Opening a Word Document Problem opening second Word document bTaryag Word 1 08-02-2011 02:48 PM
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 01:45 PM.


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