Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #213
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!goblin3!goblin.stu.neva.ru!exi-transit.telstra.net!203.50.40.42.MISMATCH!news.telstra.net!pit-spool.telstra.net!reader.news.telstra.net!not-for-mail |
|---|---|
| From | "D&JG" <donandjane1@dodo.com.au> |
| Newsgroups | comp.lang.basic.visual.misc |
| References | <4dc09c4c$0$61662$c30e37c6@pit-reader.telstra.net> <4dc33480$0$61657$c30e37c6@pit-reader.telstra.net> <iq09m3$or4$1@speranza.aioe.org> |
| Subject | Re: Shell to print |
| Date | Mon, 6 Jun 2011 23:41:18 +1000 |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.6090 |
| X-RFC2646 | Format=Flowed; Response |
| Lines | 55 |
| Message-ID | <4decd908$0$89088$c30e37c6@pit-reader.telstra.net> (permalink) |
| NNTP-Posting-Host | 122.148.234.139 |
| X-Trace | 1307367688 pit-reader.telstra.net 89088 122.148.234.139:1991 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.basic.visual.misc:213 |
Show key headers only | View raw
All Fixed!
Following code suggested by a colleague works well.
.
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application")
WordObj.Documents.Open App.Path + "\docs\" + Filename
WordObj.Printout Background:=False
WordObj.Quit
Set WordObj = Nothing
Thanks for youe input, guys
Don
"Dee Earley" <dee.earley@icode.co.uk> wrote in message
news:iq09m3$or4$1@speranza.aioe.org...
> On 06/05/2011 00:36, D&JG wrote:
>> Thanks, guys, for your replies. I can't remember where I found the
>> original
>> code but it has been very useful when copy/pasting, from one program to
>> another, whenever a Word .doc needed printing. My latest thinking is
>> that
>> it might relate to Win 7 and Office 7 together not recognising what is
>> required. Works fine in XP with Office 7 and Office 10.
>>
>> More code detail might give insight...
>>
> <SNIP CODE>
>
> But, as I asked last time, what values are you passing?
> How does it fail?
> Does right click, print work?
>
>> 'the desktop will be the
>> 'default for error messages
>> hWndDesk = GetDesktopWindow()
>>
>> 'execute the passed operation
>> success = ShellExecute(hWndDesk, sTopic, sFile, sParams, sDirectory,
>> nShowCmd)
>
> Oh, and there is no need to send the desktop window so that function can
> be removed leaving you with simply:
> ShellExecute 0, "print", documentname, "", "", SW_SHOWDEFAULT
>
> --
> Dee Earley (dee.earley@icode.co.uk)
> i-Catcher Development Team
> http://www.icode.co.uk/icatcher/
>
> iCode Systems
>
> (Replies direct to my email address will be ignored.
> Please reply to the group.)
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Find similar
Shell to print "D&JG" <donandjane1@dodo.com.au> - 2011-05-04 10:22 +1000
Re: Shell to print "Auric__" <not.my.real@email.address> - 2011-05-04 08:05 +0000
Re: Shell to print Dee Earley <dee.earley@icode.co.uk> - 2011-05-04 11:27 +0100
Re: Shell to print "Mayayana" <mayayana@invalid.nospam> - 2011-05-04 08:48 -0400
Re: Shell to print Steve Rindsberg <steve@rdpslides.com> - 2011-05-04 12:11 -0400
Re: Shell to print "D&JG" <donandjane1@dodo.com.au> - 2011-05-06 09:36 +1000
Re: Shell to print Dee Earley <dee.earley@icode.co.uk> - 2011-05-06 08:57 +0100
Re: Shell to print "D&JG" <donandjane1@dodo.com.au> - 2011-06-06 23:41 +1000
csiph-web