GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Testing Tools  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 586 of 684    Print  
How do you send email with attachment from outlook using qtp ?

  
Total Answers and Comments: 1 Last Update: November 06, 2007     Asked by: Richi 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 20, 2007 02:10:36   #1  
Ur Friend        

RE: How do you send email with attachment from outlook...

Function AttachHTMLAsMailContent(sSendTo sSendToCC sSendToBCC sSubject sHtmlPath)

Dim objOutlook
Dim objOutlookMsg
Dim olMailItem

' Create the Outlook object and the new mail object.
Set objOutlook CreateObject( Outlook.Application )
Set objOutlookMsg objOutlook.CreateItem(olMailItem)

' Define mail recipients
objOutlookMsg.To sSendTo
objOutlookMsg.CC sSendToCC
objOutlookMsg.BCC sSendToBCC

' Body of the message

With objOutlookMsg
Set fso CreateObject( Scripting.FileSystemObject )
Set ts fso.OpenTextFile(sHtmlPath 1)
strText ts.ReadAll
.HTMLBody strText
.Display
End With

' Send the message
objOutlookMsg.Send
wait(3)

' Release the objects
set objOutlook nothing
set objOutlookMsg nothing

End Function


'Sample usage
'AttachHTMLAsMailContent MyName@abc.com TestResults-MultipleAttachments D:TestCase.html



 
Is this answer useful? Yes | No

 Related Questions

Hi how can we test .net application using QTP. imean writing scripts in c#.can we directly write .net scripts in QTP,after recording the application can we enhance script using .net??can any one please give me an idea, or send me any links.
Read Answers (3) | Asked by : venky

Latest Answer : Function AttachHTMLAsMailContent(sSendTo, sSendToCC,sSendToBCC,sSubject,sHtmlPath) Dim objOutlook Dim objOutlookMsg Dim olMailItem ' Create the Outlook object and the new mail object. Set objOutlook = CreateObject("Outlook.Application") Set objOutlookMsg ...
Read Answers (1) | Asked by : Richi

What are the add-ins needed to automate Microsoft OutLook objects.I am trying to automate outlook using QTP. But it is not recognizing outlook objects properly.I want click on mails one by one and want 
View Question | Asked by : spandey123

How I can coding on qtp for remote to anysitefor run qtp and I would like to send my datatable together. 
View Question | Asked by : morantic


 Sponsored Links

 
Related Articles

SQA Software and Tools

SQA Software and Tools In quality assurance it is always important to get all the help we could get In other industries developers could easily check the products manually and discard those that do not meet the standard The length and the width of the product are checked to maintain standardization
 

Business Network Virtual Communication Tools

Business Network Virtual Communication Tools Since ages the Business community heavily relied on face to face communication for building Business relationships Face to face communications formed the basis for trust in a relationship An individual’ s appearance or the physical appearance of
 

What are Data Access Tools

Data access is the process of entering a database to store or retrieve data. Data Access Tools are end user oriented tools that allow users to build structured query language (SQL) queries by pointing and clicking on the list of table and fields in the data warehouse. Thorough computing history, t
 

Testing and Integration

Once the software is complete, it will go though rigorous testing before its actual integration.  In this article we will take a look at different types of software testing and also different types of integration. With the diversity of business setting and software development models, it al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

SAP and Microsoft tools for Customer Service

World’s largest car dealer to use SAP and Microsoft tools for Customer Service Inchcape, the London-based largest car dealer in the world, is making itself much strong now by improving its customer services arising from major SAP and Microsoft implementations. The company has also vowed to
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Career Assessment Tools

For those not sure what type of career they are interested in pursuing, career assessment tools can provide help. There are assessments available at career centers that are designed to help people figure out a good career option. They explore your personality, skills, interests, and values, and can
 

Advantages of Using SAP R/3 in comparison with other Similar Tools

ERP system takes a lead role because of some of the following reasons: Many large corporations use several different and separate information systems, often because they have merged with and/or acquired other companies with varied systems. An ERP system integrates these separate information systems
 

Advantages of Using VoiceXML In Comparison To Similar Tools

Another powerful advantage of VoiceXML is the ability for the system to re-use certain Internet structures. The vast majority of companies today use either one of two infrastructures, and these are the IVR infrastructure or the web based infrastructure. VoiceXML is powerful because it will allow
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape