Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clicking Send&Receive in Outlook
Message
 
À
12/03/2009 19:24:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01304787
Message ID:
01388372
Vues:
40
Mark,

I am not sure that your message was intended for me, but for the author who asked the question a year ago in the original post.

But if the message was for me, then I would say that the information you are taking, it is from the old article covering old OL version, and as such it may be out of date. Meanwhile to document OL commandbars controls, their names and IDs, one can use somethimg like this:
lcoutfile="c:\ol.log"
ERASE (lcoutfile)
IF TYPE("oOutlook.ActiveExplorer.CommandBars")="O" AND NOT ISNULL(oOutlook.ActiveExplorer.CommandBars)
	WITH oOutlook.ActiveExplorer.CommandBars
		FOR ia=1 TO .Count
			WITH .Item(ia)
				STRTOFILE(.accName + "    "+TRANSFORM(.Controls.count)+ " controls"+CHR(13)+CHR(10),;
							lcoutfile,.t.)
				FOR ib=1 TO .Controls.count
					STRTOFILE(REPLICATE(CHR(9),2)+.Controls(ib).accName+CHR(9)+;
						TRANSFORM(.Controls(ib).accChildCount)+ " childs"+CHR(13)+CHR(10),;
							lcoutfile,.t.)
					FOR ic=1 TO .Controls(ib).accChildCount
						IF NOT ISNULL(.Controls(ib).accChild(ic))
							STRTOFILE(REPLICATE(CHR(9),3)+;
							.Controls(ib).accChild(ic).accname + CHR(9)+TRANSFORM(.Controls(ib).accChild(ic).ID) + CHR(9)+;
							TRANSFORM(.Controls(ib).accChild(ic).Enabled)+CHR(13)+CHR(10),;
							lcoutfile,.t.)
						ENDIF
					ENDFOR
				ENDFOR
			endwith
		ENDFOR
	ENDWITH
ELSE
	?"oOutlook.ActiveExplorer.CommandBars is not an object..."
ENDIF
Good Luck






>I'll add to this, since it took me a while to find out how easy it is to use the commandbars. For example, to Reply to the currently selected email in outlook and then Paste the contents of the clipboard into that reply, do the following. You can also use the WebBrowser activeX control to place html into the clipboard first if you wish. Powerful stuff!
>
>m.loOutlook= GETOBJECT(, "Outlook.Application")   && get already open outlook obj
>m.loOutlook.ActiveExplorer.CommandBars.FindControl(,354).Execute   && reply using explorer obj
>m.loOutlook.ActiveInspector.CommandBars.FindControl(,22).Execute   && paste using inspector obj
>
>You can see a list of the commandbar IDs here and on other sites:
>http://support.microsoft.com/kb/173604
>
>-Mark
>
>>>Hi
>>>
>>>Is it possible to click the Send & Receive button in MS Outlook from within VFP?
>>>
>>>Any help extremley apreciated.
>>
>>oOutlook.ActiveExplorer.CommandBars("Standard").Controls("Send/Receive").execute
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform