Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-25-2014, 11:26 AM
jamtay317 jamtay317 is offline Opening a document with VBA Windows 7 64bit Opening a document with VBA Office 2013
Novice
Opening a document with VBA
 
Join Date: Sep 2014
Posts: 1
jamtay317 is on a distinguished road
Default Opening a document with VBA

Hello I am new to this site, and thank you for taking the time to read this! I am working on an Access database, when I Push a button the goal is for for it to open a document that I have already set up with Mail Merge. When I push the button it opens the document, but I cannot scroll between the different records.

Here is the code that I've already created.
Code:
    Private Sub cbFESOP_Click()
    Dim wrd As Word.Application
    Set wrd = CreateObject("Word.Application")
    Dim doc As Word.Document
    Set doc = wrd.Documents.Open("Y:\Reports\FESOP Certification.docx")
    
    wrd.Visible = True
End Sub



any and all help will be appreciated thank you!
Reply With Quote
  #2  
Old 09-25-2014, 02:23 PM
macropod's Avatar
macropod macropod is offline Opening a document with VBA Windows 7 64bit Opening a document with VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your code has nothing to indicate that you're actually trying to merge anything. For code to do that, see, for example 'Send Mailmerge Output to Individual Files' in: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a document with VBA Need Help With Opening a Word Document PosseJohn Word VBA 1 12-06-2013 01:16 PM
Opening a document with VBA Columns appear when opening new document PlushKitti Word 1 07-21-2013 08:20 PM
Add increasing number at document opening HidExp Word 6 09-17-2012 12:28 AM
Opening a document with VBA Changing Opening Document Gregshah Word 8 01-30-2012 03:01 PM
Word document not opening 7beats Word 2 04-16-2010 12:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:33 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