VBA

Moderators: PavlinII
Number of threads: 1673
Number of posts: 3078

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: mail merge from ms access to ms word vba Posted by jgolba99 on 27 Dec 2011 at 12:59 PM
I found the answer elsewhere and I figured I would post a response so that if anyone else had this issue they could find it here.

Private Sub cmdPrint_Click()
Dim MyWord As Word.Application
Dim PathDocu As String


If Me.LawFirmName <> "" Then
Set MyWord = New Word.Application
PathDocu = "C:\Word Template\"

With MyWord

.Visible = True
.Documents.Open (PathDocu & "MailerTemp.dotx")


This is the original post question and the answer is to change this portion .Visible = True
.Documents.Open (PathDocu & "MailerTemp.dotx")

If you change the .Open to .Add it will open a new document using the template.
Thread Tree
jgolba99 mail merge from ms access to ms word vba on 16 Dec 2011 at 3:25 PM
jgolba99 Re: mail merge from ms access to ms word vba on 27 Dec 2011 at 12:59 PM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.