Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
| Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 11th, 2008, 10:05 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: West Palm Beach, Florida, USA.
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default [Resolved] [2005] Call Outlook with attachment

I have a vb application that displays a Crystal Report (using CrystalReportViewer). User would like to open outlook with the Crystal Report as an attachment and select receipients.

I have the shell command that opens outlook

Code:
dblRetVal = Shell("C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE", vbMaximizedFocus)
but I am not sure if it is possible to include an attachement
 
Old February 11th, 2008, 10:47 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

http://office.microsoft.com/en-us/ou...031101033.aspx

outlook /a "file.doc"

/- Sam Judson : Wrox Technical Editor -/
 
Old February 11th, 2008, 01:49 PM
Friend of Wrox
 
Join Date: Mar 2007
Location: West Palm Beach, Florida, USA.
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default

So, can I do it like this?

Code:
dblRetVal = Shell("C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE" + "/a" + """ + CrystalReportViewer1 + """ + ")", vbMaximizedFocus)
Not sure if I can attach a CrystalReportViewer as a document.

 
Old February 11th, 2008, 06:15 PM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

No you can't - you would have to save the Crystal report to a file (PDF would be my most likely suggestion) and attach that. I'm sure Crystal reports comes with functionality like that.

Also if you use the System.Diagnostics.Process class, as it provide functionality for starting processes with arguments.

/- Sam Judson : Wrox Technical Editor -/
 
Old February 12th, 2008, 09:59 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: West Palm Beach, Florida, USA.
Posts: 205
Thanks: 4
Thanked 0 Times in 0 Posts
Default

OK, Crystal Report has an option to export a view to a .pdf file. I will try to use that. Thank you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
[Resolved] Open Outlook application snufse .NET Framework 2.0 6 October 26th, 2008 10:53 PM
[Resolved] Call JScript tootip function snufse ASP.NET 2.0 Basics 11 August 22nd, 2008 11:33 AM
Call Outlook snufse Visual Studio 2005 0 March 11th, 2008 11:10 AM
[Resolved] [2005] Call Outlook in vb application snufse .NET Framework 2.0 1 February 12th, 2008 04:58 PM
IS it possible to call Outlook from VBScript? nfoliveira VBScript 1 March 19th, 2004 09:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.