Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #122
| 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> |
| Subject | Re: Shell to print |
| Date | Fri, 6 May 2011 09:36:16 +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 | 73 |
| Message-ID | <4dc33480$0$61657$c30e37c6@pit-reader.telstra.net> (permalink) |
| NNTP-Posting-Host | 122.148.234.139 |
| X-Trace | 1304638592 pit-reader.telstra.net 61657 122.148.234.139:4845 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.basic.visual.misc:122 |
Show key headers only | View raw
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... Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" _ (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long ================= sFile = Fn Call RunShellExecute(sTopic, sFile, sParams, sDirectory, SW_SHOWDEFAULT) ================= Private Sub RunShellExecute(sTopic As String, _ sFile As Variant, _ sParams As Variant, _ sDirectory As Variant, _ nShowCmd As Long) Dim hWndDesk As Long Dim success As Long 'the desktop will be the 'default for error messages hWndDesk = GetDesktopWindow() 'execute the passed operation success = ShellExecute(hWndDesk, sTopic, sFile, sParams, sDirectory, nShowCmd) End Sub > > The document loads into MSOffice, prints, and the program returns to > continue as expected. So far, this has been flawless in systems operating > with Win XP. Since attempting to run this from Windows 7, however, the > function does not work. > Don
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Next 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