Object Required?

The code statement:

Selection.TypeText Text:="This is sample text."

Works fine in VBA code in MS Word.  The text string is inserted into
the document at the insertion point.

But when using Outlook 2003's VBA editor (for plain text messages, not
using Word as the mail message editor) the same statement fails with
an "object requrired" debug message.  I presume that the required
object is something like "Current message body." but where do I find a
pick list or other description of appropriate objects?

Thanks,

Fred Holmes
0
fsh (33)
9/10/2004 12:29:18 PM
outlook 87535 articles. 11 followers. Follow

1 Replies
456 Views

Similar Articles

[PageSpeed] 10

When in doubt, check the object browser: Press ALt+F11 to open the VBA 
environment in Outlook, then press F2. Switch from <All Libraries> to 
Outlook to browse all Outlook objects and their properties, methods, and 
events. Select any object or member, then press F1 to see its Help topic.

In the object browser, you can easily discover that Outlook's only Selection 
object refers to a selection of items in an Explorer (i.e. folder) window.

FYI, there is a newsgroup specifically for general Outlook programming 
issues "down the hall" at microsoft.public.outlook.program_vba or, via web 
interface, at 
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

Back to your action issue, is Word your email editor?

-- 
Sue Mosher, Outlook MVP
Author of
     Microsoft Outlook Programming - Jumpstart for
     Administrators, Power Users, and Developers
     http://www.outlookcode.com/jumpstart.aspx


"Fred Holmes" <fsh@his.com> wrote in message 
news:m273k0930ikmr4ruvfk1hoikdmanakmhh6@4ax.com...
> The code statement:
>
> Selection.TypeText Text:="This is sample text."
>
> Works fine in VBA code in MS Word.  The text string is inserted into
> the document at the insertion point.
>
> But when using Outlook 2003's VBA editor (for plain text messages, not
> using Word as the mail message editor) the same statement fails with
> an "object requrired" debug message.  I presume that the required
> object is something like "Current message body." but where do I find a
> pick list or other description of appropriate objects?


0
suemvp (4038)
9/10/2004 1:44:18 PM
Reply:

Similar Artilces:

overwrite a serialized object
I'm serializing an object into a file in XML. After the object is serialized, some other relevant data is written into the file. The rest of the data winds up being very large most of the time. Is there a way to re-serialize the object over itself? Here's a quick example: Say I have this: <?xml version="1.0" encoding="utf-8"?> <fileroot> <SerializedObject> <intParam>6</intParam> <doubleParam>4.68</doubleParam> </SerializedObject> <otherData>blarg</otherData> </fileroot> Is it possible ...

Configuration requirements.
Could someone post the details of the server config in terms of Windows version, SQL, etc. for MSCRM 3.0 server? Thanks! I've been told by Microsoft that the hardware/software requirements for 3.0 have not changed from 1.2 (You can learn more about 1.2 requirements at technet: http://www.microsoft.com/technet/prodtechnol/mscrm/mscrm12/plan/04_PlnDp.mspx#EDAA ). They also said that 3.0 will run on SQL 2005. -- Matt Wittemann http://icu-mscrm.blogspot.com "Niths" wrote: > Could someone post the details of the server config in terms of Windows > version, SQL, etc. f...

Converting C# object to XmlElement object.
Hi everyone, the class XmlSerializer provides a generic way to convert a C# object to a XML file. Does anybody know a similar way to convert a C# object to a XmlDocument or XmlElement object without writing the content to an external file? I am using a XML DOM tree as a sort of in-memory "database": various components of our application saves their states into certain sub-trees of the DOM tree. thanks, James X. Li James X. Li wrote: > the class XmlSerializer provides a generic way to convert a > C# object to a XML file. Does anybody know a similar way > to convert...

outlook cannot find an object
My notebook was returned from service with a trial MS Office 2007. I deleted it and reloaded MS Office 2003. When trying to import Contacts pst Outlook reports cannot find an object Hard to know where to start. You "deleted" an installation of Outlook? What does that mean? What did you do? You never import Outlook data. Post an accurate and complete account of what you did. -- Russ Valentine "GCarman" <GCarman@discussions.microsoft.com> wrote in message news:CE61C1B9-DBDF-4CD3-B1AB-B9492A0FAFC1@microsoft.com... > My notebook was returned from serv...

System requirements for single-server using Small Business Server
What would be the recommended system requirements for a single-server deployment of Microsoft Dynamics CRM 4.0 with the following: 1. Microsoft Windows Small Business Server 2003 Premium Edition R2 (functioning as an Active Directory Domain Controller) 2. Microsoft Dynamics CRM 4.0 Professional Server 3. SQL Server 2005 Standard Edition SP2 4. SQL Server 2005 Reporting Services 5. Data Connector for Microsoft Dynamics CRM 6. Exchange Server 2007 Standard Edition 7. Microsoft Dynamics CRM E-mail Router I have basic system requirements for the CRM server from the Implementation Guid...

downloading OLE Object /BLOB data (.doc/.xls files) from SQL Server table to local machine through MS Access
I have a table which has a filed as OLE Object in which i have either .doc or .xls files stored in SQL Server. I using MS Access as a front and which has linked tables with sql server. i have created a form called frmfiledownload. The field name in the database is called filedata datatype OLE Object. I need to to be able to dowload that file on my loacl machine. I need to have a filedata field showing the file name and when i can click a button it should download that file on my machine. If anyone has done something like that please please do send me your code sample. thanks bunch in advanc...

Help Required
I need a little help while working of MS Access 2000. I have a table which contians two columns labellbed as A and B. In column A I can either enter Vegetable or Fruit (combo box). Now what I want is that if I select Vegetable in Column A list of Vegetables appear in colum B and vice versa. I have tried to write queries and have tried other methods too but I haven't been successful. I will be very thankful if someone can help me in this regard. Kind Regards, Hasnain Raja What you are asking is a very common question called a cascading combo. NOTE: DON'T EVER USE TABLES FOR ENTER...

requiring password when opening offline
When opening ms outlook offline, it doesn't require password, so that anyone opening it offline can have access to my account. Is there any way to require password when opening outlook offline? What I could suggest for you is that you can try to set a password fo the .pst file which Outlook uses while opening so that everytime yo use Outlook, you would be prompted for the password. With Regards ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Many thanks for your r...

Really getting desperate... help required, please !
Hi, I'm trying to do something very simple in access 2007. I have a query that generates a table with 4 columns as follows: Program Project Size Status PGM1 PROJ1 Small Green PGM1 PROJ2 Medium Green PGM1 PROJ3 Medium Yellow PGM2 PROJ4 Large Green PGM2 PROJ5 Small Green PGM2 PROJ6 Medium Yellow PGM2 PROJ7 Small Red PGM2 PROJ8 Large Green PGM3 PROJ9 Medium Yellow PGM3 PROJ10 Small Yellow PGM3 PROJ11 Large Green PGM3 PROJ12 Large Red PGM3 PROJ13 Large Green I turn this query into a pivot chart where I create a view that shows a barchart indicating the status by project size. I customize t...

2003: Referencing Object On Subreport
I've Googled this and *think* I'm doing the right thing, but no-go. Report A has subreport object "subViolations" whose SourceObject is another report. Within Report A's code I am trying to change the caption on a label in the subreport. Generically, it seems like this should work in the Immediate window: Me.subViolations.Report!lblReportHeader = "Compliant" or, simpler still: ?Me.subViolations.Report.Name But both throw Run-time error '2455'; "You entered an expression that has an invalid reference to the property For...

Chip Pearson's VB Object references
I recently distributed a 2007 workbook that contained pop up calendars courtesy of the Microsoft Office Calendar Control 2007. I foolishly assumed that when a user opened the workbook, Excel would “realise” that there was a Calendar control embedded and automatically enable the VB reference. Optimistic eh? I was looking at ways to automate the enablement of the Calendar reference object – I found this code on Chip Pearson’s site and wondered if a similar thing could be run to automatically select the Calendar control? This code enables the Microsoft Visual Basic Application Ex...

Going from string variable containing XML to object
Hi all, I have a string that contains XML content (and also an XmlDocument object). I need to "deserialize" that XML into an object of a known type. Right now, the only way I have found is to create a memory stream, write the XmlDocument object to that MemoryStream using an XmlWriter and then creating an XmlSerializer object. It seems that's a long way around to achieving what I want to do. Does anyone know of a better (more efficient) method? TIA, -- Sven. SA wrote: > I have a string that contains XML content (and also an XmlDocument object). > > I need t...

Does the 'Expires After' message option require Microsoft Exchange on Sender/Receiver side or both?
This is a multi-part message in MIME format. ------=_NextPart_000_0131_01C4F8A9.20513190 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Does the 'Expires After' message option require Microsoft Exchange on = the=20 sender side, receiver side, or both? Thanks for the answer. Eriq ------=_NextPart_000_0131_01C4F8A9.20513190 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <...

display ADO object Recordset in html
hey everyone, can anybody please help me out on how to display ADO "recordset" in html please i will be very thankful. shoaib Look at the drilldown.htm file in the ..\Store Operations\HTML directory... -- -- Glenn Adams Tiber Creek Consulting http://www.tibercreek.com glenn@tibercreek.com ---------------------------------------------- Please DO NOT respond to me directly but post all responses here in the newsgroup so that all can share the information "Shoby" <Shoby@discussions.microsoft.com> wrote in message news:C416F056-F9B1-4D78-AF93-C6F7C368A4F3@m...

read-only objects (CRM 3)
I'm building an Order workflow that's triggered by a change to Canceled status. It generate several tasks and emails, and I need it to update a custom date field on the order with the current date. The update entity portion of the workflow fails because once the order is cancelled the field is read-only. Here's the question: How to I make a specific field not read-only once the order is cancelled? -- Tracy Bourgoine, IT Analyst On Nov 5, 5:59=A0am, TracyB <Tra...@discussions.microsoft.com> wrote: > I'm building an Order workflow that's triggered by a...

outlook 97 OLE Object error
we run outlook 97 and office 97 when i try to open a file with OLE Object it won't get OLE Object: Picture (Device Independent Bitmap) it works on other systems ok ...... ...

cannot create a recordset object for a link table
Hi, I have a mysql dadtbase and access has a table called web_stat link to it. I have the following code Set dbs = CurrentDb Set fromset = dbs.OpenRecordset("web_stat", dbOpenTable) the 2nd line gives me a invalid operation error. It works fin if I replace web_stat with local_stat, ie a table I created on acces. How can I use DOA to access a link table?? Ted Check the DAO Help file, but I'm pretty sure dbOpenTable is an invalid instruction with a linked table. Perhaps you want dbOpenDynaset or dbOpenSnapshot? I think Dynaset is the default with a linked table (so ...

GP 10.0 Server Requirements
Will GP 10.0 run on a SQL 2000 Server? Hi James Here is what the MS page says for data base requirements: Database Requirements Microsoft SQL Server 2000 SP 4 -Standard Edition -Workgroup Edition -MSDE NOTE: Microsoft SQL Server 2000 mainstream support ends 4/8/2008. Click HERE to go to the Support Lifecycle Page for Microsoft SQL Server 2000. Microsoft SQL Server 2005 SP 2 -Standard Edition 32-bit -Workgroup Edition -Express Edition Fliehigh "K James" wrote: > Will GP 10.0 run on a SQL 2000 Server? Has anyone used GP 10.0 with Microsoft SQL Ser...

insert excel charts as objects
Hi, I insert excel charts into publisher using the insert object command. It allows me to double click on the chart and modify it in excel eve though it has been pasted in publisher. I have two problems with this The first is that I am drastically shrinking the charts and when I tr to modify them in excel they often become distorted. The secon problem I have is that I would like to shrink the chart befor inserting it into publisher. Is there a way to do this while als shrinking the background? Now I just end up with a small chart, bu tons of blank space around it that gets inserted as w...

[object]
why does this code product a messagebox that says '[object]' instead of a web page? spDoc->get_url(&url); spDoc->toString(&url); MessageBox(NULL, W2A(url), W2A(url), MB_OK); spDoc is an IHtmlDocument2 anonymous, As IHtmlDocument2 represents a DHTML-document, this would be the expected behaviour. You might want to read up on JavaScript toString - there are several JavaScript references on the Internet. You ought to get the url itself by just calling get_url (or the equivalent get_href - for me, this would conceptually map to the DHTML DOM better :-)))). Johan Rosengre...

CBitmap Attach/Detach
hi! i have an app where someone put the following code into an update function of a bitmap button: HBITMAP hbmTmp; hbmTmp = (HBITMAP)::LoadImage( AfxFindResourceHandle( MAKEINTRESOURCE( u_uiBitmapID ), RT_BITMAP ), MAKEINTRESOURCE( u_uiBitmapID ), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS ); if( m_bmMain.m_hObject ) m_bmMain.Detach(); m_bmMain.Attach( hbmTmp ); isn't the detached object getting lost this way? and if so - is it correct that there is only a limited number of "lost bitmaps" "possible" within an...

Require Password to View Worksheet
I have a workbook with 12 worksheets. One of them contains data that i not for all to see. I'd like to require a password to view this on worksheet while leaving the remaining sheets open to all. Right now I' just hiding it, but I'd like to make it more secure. Any ideas? Thanks -- Message posted from http://www.ExcelForum.com If you protect the windows structure (tools|protect workbook), then that worksheet can't be shown (until the workbook is unprotected). The bad news is that there is code posted every day to do just that. If you really want to protect the info on that...

Some macro help with formatting object please
I have a macro that turns on the calculate command function while the user works in it. I was asked if I could have the color of the text box that launches the macro turned RED when the calculate feature has been turned off. Is that possible? TIA! activesheet.textbox1.backcolor=&h0000ff -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Alan" <me@here.now> wrote in message news:oYeGc.8684$WM5.492396@news20.bellglobal.com... > I have a macro that turns on the calculate command fu...

bandwidth requirements
I have been told there are minimum bandwidth requirements for some applications. Can anyone tell me if this is true and what the minimum bandwidth requirements would be for Microsoft Exchange? That depends on your organization size: how many users, how many servers, messaging habits, etc. For a branch office with 30 users and a centralized Exchange server, 64 Kb may be sufficient... Or not! -- Blog "subject: exchange" http://spaces.msn.com/members/ehlo "Terri" <nospam.ttremblay@dca-falcon.com> wrote in message news:10v2blrpetc6j9f@corp.supernews.com... &...

Reporting Services And Object Data Source 06-14-10
Hi, I've a report with a object data source. I've a entity (A) with a property (b) that return an object (C) with other property. how can i put a property C in my report? Thanks Alberto There is a same thread in this community and I have replied in that thread. Here is the response: ====================== To view the property D in your report data source, you need to create your bussiness objects like this: 1. Class C class BusinessObjectC { private string d; public BusinessObjectC(string strD) { d = strD; } public st...