Dim intAnswer as Integer

intAnswer = msgbox ("Do you want to print the Word document?",vbYesNo,
"Print")
        Select Case intAnswer
                Case 6
                        'Code to Print Word Document here
                Case 7
                        'Code to Print Access Report here
                Case Else
                        'I always have something here "Just in Case"
        End Select 

Dawn Crosier
"Education Lasts a Lifetime"

This message is posted to a newsgroup. Please post replies and questions to
the newsgroup so that others can learn as well.

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Lynn
Sent: Tuesday, July 25, 2006 7:37 AM
To: [email protected]
Subject: [ms_access] Re: Print from Another Program?

Can anyone answer this for me?  


--- In [email protected], "Lynn" <[EMAIL PROTECTED]> wrote:
>
> 
> YES!  Thank you SO MUCH, Robin, that worked perfectly....now can I 
> throw another one at ya?
> 
> What if I want a box to come up that says, Do you want to print
the word doc? (in conjunction with the underlying form) and if yes", it does
what you outlined below.  If "no", it simply prints the form and not the
word doc?
 
> What would that look like?  :)  Big thanks again,
> 
> Lynn
> Ball Ground, GA
> 
> --- In [email protected], "Robin" <falconer5@> wrote:
> >
> > Hello Lynn,
> > 
> > I'd use automation in the OnClick event of the button:
> > 
> > 
> >     Dim objWord As Word.Application
> >     
> >     Set objWord = CreateObject("Word.Application")
> >     
> >     With objWord
> >         .Documents.Open "T:\Individual Risk(IRF)\IRF Input
> Worksheet
> > part 2.doc"
> > 
> >         .PrintOut
> >     End With
> >     
> >     objWord.Quit
> >  
> >     Set objWord = Nothing
> > 
> > 
> > Watch out for the word wrap (they are all supposed to be single 
> > lines of code) and you'll need to add a reference to Word in
your 
> > references.
> > 
> > Hope that helps.
> > 
> > Regards
> > Robin
> > 
> > --- In [email protected], "Lynn" <winpins@> wrote:
> > >
> > > Hi all:
> > > 
> > > I have a print button that simply prints a record off a form.  
> > Under
> > > it, I have a hyperlink to:  T:\Individual Risk(IRF)\IRF Input 
> > > Worksheet part 2.doc   which goes out to MS Word and opens 
that 
> > > document.  I can print it from there.
> > > 
> > > Is there a way for me to do that programatically...for
instance 
> > > every time I hit the print button a MsgBox asks if I'd also
like 
> > to
> > > print the .doc (above) and when I say Yes, it'll do
> > that 'invisibly' 
> > > for me?  I don't need to actually SEE MS Word load every time,
> so
> > if
> > > it could do it behind the scenes, that would be most excellent.
> > > 
> > > I've looked all over the internet and can't find any
> instructions
> > on
> > > it.  Is this possible?
> > > 
> > > Thanks!
> > > 
> > > Lynn
> > > Ball Ground, GA
> > >
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~-->
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/7EuRwD/fOaOAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links



 






--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 7/24/2006





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/7EuRwD/fOaOAA/yQLSAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to