Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Security 2

Status
Not open for further replies.
I tried it out. With a small download and a setup.exe, its supposed to work with versions of Outlook thru 2007.
Install it.
Start Outlook
Notice a new Security options on one of the menues
Close Outlook
Run your automation - Click Allow when the prompt comes up, and check always allow this program. and Your finished.
Similar to ClickYes I guess, but very easy, Worked the first time, AND with regular Outlook commands the mail went on out - does not get stuck in either the outbox or the drafts
 
Thanks for the star - this is the code i use to send

Im looking for a way to "watch" the events of outlook and put a message on the screen until outlook finishes its work"

Code:
*click event of send to specific address

LOCAL o,onamespace,cbody,cattach,cpaper,cemailadd,cbccemailadd
LOCAL csubject,cto,cobfilename,loword,lResult,m.ldoutdate

cpaper=[Anderson Independent]
cemailadd=[****@****.com]

 
 *TEST FOR INTERNET CONNCETION (this isnt working with server2003)
	*!*	Declare Integer InternetCheckConnection In wininet;
	*!*		STRING lpszUrl, Integer dwFlags, Integer dwReserved

	*!*	 	#Define FLAG_ICC_FORCE_CONNECTION  1
	*!*		lResult = (InternetCheckConnection("***yoursmtpserver****", FLAG_ICC_FORCE_CONNECTION, 0)=1)
	*!*			If .Not. lResult
	*!*				Wait Window [no internet connection - CANNOT SEND EMAIL]
	*!*				RETURN
	*!*			Else
	*!*				*DO NOTHING - CONTINUE SENDING EMAIL
	*!*				
	*!*		Endif

* Prepare subject and body of email
	SELECT fhdm
	*write subject and body variable
	IF UPPER(SUBSTR(case_no,1,1))=[H]
		csubject=[From: Pruitt Funeral Home - Obit for - ]+PROPER(trim(ln_dec))+[, ]+PROPER(TRIM(fn_dec))+[-Rundate=]+DTOC(m.ldoutdate)
	ELSE
		IF UPPER(SUBSTR(case_no,1,1))=[W]
			csubject=[From: Parker-White Funeral Home - Obit for - ]+PROPER(trim(ln_dec))+[, ]+PROPER(TRIM(fn_dec))+[-Rundate=]+DTOC(m.ldoutdate)
		ENDIF
	ENDIF

	cbody=["Please run the attached obit in your ]+dtoc(m.ldoutdate)+[or next edition and email the charges to us at obits@parkerwhitepruitt.com"]

*prepare obit filename for attachment (reverse case number)
	m.retstring = ""
	For i = 1 To 6
	m.retstring = Substr(case_no,i,1)+m.retstring
	Next

*prepare string for filename - lastname.firstname.reversed case_no.obt.doc - this should be unique
	cobfilename='"'+'z:\obit\'+Proper(Trim(ln_dec))+[.]+Proper(Trim(fn_dec))+[.]+m.retstring+'.obt.doc'+'"'             

*create email attach and send
	o=createobject("outlook.application")
	*o.visible=.t.
	oitem=o.createitem(0)
	oitem.subject=csubject
	oitem.to=cemailadd
	*oitem.bcc="emailname@emailaddress"  && this causes an error
	oitem.body=CBODY
	oitem.attachments.add(&COBFILENAME)
	oitem.send
	o=.null.
	RELEASE ALL LIKE o


*!*	other housekeeping 	**append task to takks dbf and mark it as done
*!*		APPEND BLANK IN tasks
*!*		REPLACE case_no WITH fhdm.case_no, TASKS.type WITH [OB], TASKS.TYPE_NAME WITH [OBIT - Anderson Ind.], ok WITH .t.,;
*!*			filed WITH .t., file_dt WITH DATE(), TASKS.TIME WITH TIME(DATE()) IN tasks
*!*		replace andok WITH .t. in fhdm
*!*		this.Parent.check1.Refresh()


*!*		*disable this button now
*!*		this.Enabled=.f.

o=.null. 

rele o,onamespace,cbody,cattach,cpaper,cemailadd,cbccemailadd
rele csubject,cto,cobfilename,loword,lResult,m.ldoutdate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top