Re: Need to load and print a merged document from VB
- From: "MikeD" <nobody@xxxxxxxxxxx>
- Date: Fri, 8 Jul 2005 00:08:45 -0400
"Keith" <Keith@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5951DB74-D14C-4F6C-9E2E-AFDBEE1890BC@xxxxxxxxxxxxxxxx
> Hi,
>
> I have set up a mail merge document in MS Word I'll call MyTemplate.doc I
> run Mail Merge to merge with a text file called MyData.txt.
>
> I'm using VB to generate a new MyData.txt file. Has anyone ever written
> code that will load MyTemplate.doc, instruct MyTemplate to mail merge into
> a
> new document, then print the new document and exit the new document and
> MyTemplate without saving?
>
> Also, I may have to set some of the printer settings before I print it.
>
> Now can you do this with 3 or fewer lines of code? (just kidding).
I can't say that I've personally done what you're needing. I can tell you it
will almost definately take more than 3 lines of code. Although, if there's
a way to do it in 3 lines or less, Rick Rothstein is the guy who will know.
He's the king of the one-liners. <g>.
The best newsgroup for you to get help with this is actually one of the
MSWord (or Office) newsgroups because you'll need to use Word Automation.
Try one or more of the following (be sure to crosspost, not multipost, if
posting to more than one newsgroup):
microsoft.public.word.mail
microsoft.public.word.mailmerge.fields
microsoft.public.word.vba.general
microsoft.public.office.developer.vba
--
Mike
Microsoft MVP Visual Basic
.
- References:
- Need to load and print a merged document from VB
- From: Keith
- Need to load and print a merged document from VB
- Prev by Date: Need to load and print a merged document from VB
- Next by Date: Setting the build number in VB6
- Previous by thread: Need to load and print a merged document from VB
- Next by thread: Setting the build number in VB6
- Index(es):
Relevant Pages
|
Loading