Article: 179728 of microsoft.public.fox.programmer.exchange
Thread-Topic: Grabbing an email Address from a Form
thread-index: AcUr28q9KCKFV5O1T9S1jFs1pPUUfA==
X-WBNR-Posting-Host: 206.29.98.226
From: =?Utf-8?B?VG9t?= <Tom@discussions.microsoft.com>
Subject: Grabbing an email Address from a Form
Date: Fri, 18 Mar 2005 08:59:04 -0800
Lines: 25
Message-ID: <F3C056F1-CCF4-4639-874F-568BC1DBAE15@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.fox.programmer.exchange
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: news.btopenworld.com!btnet-feed3!news-peer0-test!btnet!newshosting.com!nx02.iad01.newshosting.com!news.alt.net!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: news.btopenworld.com microsoft.public.fox.programmer.exchange:179728
hello, i am fairly new to all this. i have a contact form in a app we have. i
want to grab the email address from the form and open up Outlook, have the
address already in the .to and outlook just waiting for the user to input
something in the Body and to send it. currently my code goes some of the way
but not all.
oOutlook = createobject("Outlook.Application")
#Define olFolderdisplaynormal 0
oNameSpace = oOutlook.GetNameSpace("MAPI")
oExplorer = oOutlook.Explorers.add (oNameSpace.Folders[1],
olFolderDisplayNormal)
oExplorer.Activate()
#define olMailItem 0
oMailitem = oOutlook.createitem(olMailitem)
WITH oMailitem
.subject = "This is my Test Button"
.to = ("what do i put here??? ")
endwith
oMailItem.save()
i have tried the _miscbtn class in vfp6 and it does it, only it places the
entire form contents in the Body of the message. its easy to pull addresses
from the contacts folder but i cant from my form.
thank you in advance for your help.
Tom