Welcome to Lockergnome.com!
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

ol 2003 contacts form questions

 
   Home -> Office -> Programming VBA RSS
Next:  Programming VBA: Outlook 2007 Attachment Position  
Author Message
Gary Keramidas

External


Since: Dec 14, 2005
Posts: 8



(Msg. 1) Posted: Mon Aug 06, 2007 4:06 pm
Post subject: ol 2003 contacts form questions
Archived from groups: microsoft>public>outlook>program_vba (more info?)

i'm used to writing vba in excel, but someone wants some code for outlook. since
i never use outlook, my question is:

how do you address the large note field on the general tab of the contact form?
every other field has a name, this one shows nothing.

i just want to enter some data in there automatically.

--


Gary
Back to top
Login to vote
Sue Mosher [MVP-Outlook]

External


Since: Feb 11, 2005
Posts: 21627



(Msg. 2) Posted: Mon Aug 06, 2007 5:45 pm
Post subject: Re: ol 2003 contacts form questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Its name is Body.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Gary Keramidas" <GKeramidasATmsn.com> wrote in message news:Otf$QVG2HHA.748@TK2MSFTNGP04.phx.gbl...
> i'm used to writing vba in excel, but someone wants some code for outlook. since
> i never use outlook, my question is:
>
> how do you address the large note field on the general tab of the contact form?
> every other field has a name, this one shows nothing.
>
> i just want to enter some data in there automatically.
>
> --
>
>
> Gary
>
>
>
Back to top
Login to vote
Gary Keramidas

External


Since: Dec 14, 2005
Posts: 8



(Msg. 3) Posted: Mon Aug 06, 2007 9:42 pm
Post subject: Re: ol 2003 contacts form questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

thanks sue, but isn't body the body of the actual email? if they're both named
body, how do you distinguish one from the other?

--


Gary


"Sue Mosher [MVP-Outlook]" <suemvp DeleteThis @outlookcode.com> wrote in message
news:eI0ERNJ2HHA.4584@TK2MSFTNGP03.phx.gbl...
Its name is Body.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Gary Keramidas" <GKeramidasATmsn.com> wrote in message
news:Otf$QVG2HHA.748@TK2MSFTNGP04.phx.gbl...
> i'm used to writing vba in excel, but someone wants some code for outlook.
> since
> i never use outlook, my question is:
>
> how do you address the large note field on the general tab of the contact
> form?
> every other field has a name, this one shows nothing.
>
> i just want to enter some data in there automatically.
>
> --
>
>
> Gary
>
>
>
Back to top
Login to vote
Sue Mosher [MVP-Outlook]

External


Since: Feb 11, 2005
Posts: 21627



(Msg. 4) Posted: Mon Aug 06, 2007 11:19 pm
Post subject: Re: ol 2003 contacts form questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If you look at the object browser in VBA, you'll see that every Outlook item object has a Body property, from MailItem to ContactItem, etc., just as every item has a Subject property.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Gary Keramidas" <GKeramidasATmsn.com> wrote in message news:O2YcsQJ2HHA.5980@TK2MSFTNGP04.phx.gbl...
> thanks sue, but isn't body the body of the actual email? if they're both named
> body, how do you distinguish one from the other?
>
> "Sue Mosher [MVP-Outlook]" <suemvp RemoveThis @outlookcode.com> wrote in message
> news:eI0ERNJ2HHA.4584@TK2MSFTNGP03.phx.gbl...
> Its name is Body.
>
>
> "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
> news:Otf$QVG2HHA.748@TK2MSFTNGP04.phx.gbl...
>> i'm used to writing vba in excel, but someone wants some code for outlook.
>> since
>> i never use outlook, my question is:
>>
>> how do you address the large note field on the general tab of the contact
>> form?
>> every other field has a name, this one shows nothing.
>>
>> i just want to enter some data in there automatically.
Back to top
Login to vote
Gary Keramidas

External


Since: Dec 14, 2005
Posts: 8



(Msg. 5) Posted: Mon Aug 06, 2007 11:46 pm
Post subject: Re: ol 2003 contacts form questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

well, it doesn't seem to work anything like excel.

here's what i have and it doesn't work. i just want to add text to the body of
the open contact.

Sub Add_text()
Dim olapp As Outlook.Application
Dim objmail As Outlook.ContactItem
Set objmail = olapp.Item(olContactItem)
With objmail
.Bodyitem = "test"
End With
End Sub

--


Gary


"Sue Mosher [MVP-Outlook]" <suemvp DeleteThis @outlookcode.com> wrote in message
news:ufAVuHK2HHA.1100@TK2MSFTNGP06.phx.gbl...
If you look at the object browser in VBA, you'll see that every Outlook item
object has a Body property, from MailItem to ContactItem, etc., just as every
item has a Subject property.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Gary Keramidas" <GKeramidasATmsn.com> wrote in message
news:O2YcsQJ2HHA.5980@TK2MSFTNGP04.phx.gbl...
> thanks sue, but isn't body the body of the actual email? if they're both named
> body, how do you distinguish one from the other?
>
> "Sue Mosher [MVP-Outlook]" <suemvp DeleteThis @outlookcode.com> wrote in message
> news:eI0ERNJ2HHA.4584@TK2MSFTNGP03.phx.gbl...
> Its name is Body.
>
>
> "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
> news:Otf$QVG2HHA.748@TK2MSFTNGP04.phx.gbl...
>> i'm used to writing vba in excel, but someone wants some code for outlook.
>> since
>> i never use outlook, my question is:
>>
>> how do you address the large note field on the general tab of the contact
>> form?
>> every other field has a name, this one shows nothing.
>>
>> i just want to enter some data in there automatically.
Back to top
Login to vote
Sue Mosher [MVP-Outlook]

External


Since: Feb 11, 2005
Posts: 21627



(Msg. 6) Posted: Tue Aug 07, 2007 7:00 am
Post subject: Re: ol 2003 contacts form questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The basic principles work just like Excel: Objects need to be properly instantiated, and you have to use the property names that the object browser tells you about, not make up an Application.Item or ContactItem.Bodyitem property.

First, instantiate your Outlook.Application object:

Set olApp = CreateObject("Outlook.Application")

Then, instantiate the open contact:

Set objMail = olApp.ActiveInspector.CurrentItem

Finally, set the Body property:

objMail.Body = "test"

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Gary Keramidas" <GKeramidasATmsn.com> wrote in message news:eVDSLWK2HHA.4400@TK2MSFTNGP06.phx.gbl...
> well, it doesn't seem to work anything like excel.
>
> here's what i have and it doesn't work. i just want to add text to the body of
> the open contact.
>
> Sub Add_text()
> Dim olapp As Outlook.Application
> Dim objmail As Outlook.ContactItem
> Set objmail = olapp.Item(olContactItem)
> With objmail
> .Bodyitem = "test"
> End With
> End Sub
>
> --
>
>
> Gary
>
>
> "Sue Mosher [MVP-Outlook]" <suemvp.TakeThisOut@outlookcode.com> wrote in message
> news:ufAVuHK2HHA.1100@TK2MSFTNGP06.phx.gbl...
> If you look at the object browser in VBA, you'll see that every Outlook item
> object has a Body property, from MailItem to ContactItem, etc., just as every
> item has a Subject property.
>
> "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
> news:O2YcsQJ2HHA.5980@TK2MSFTNGP04.phx.gbl...
>> thanks sue, but isn't body the body of the actual email? if they're both named
>> body, how do you distinguish one from the other?
>>
>> "Sue Mosher [MVP-Outlook]" <suemvp.TakeThisOut@outlookcode.com> wrote in message
>> news:eI0ERNJ2HHA.4584@TK2MSFTNGP03.phx.gbl...
>> Its name is Body.
>>
>>
>> "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
>> news:Otf$QVG2HHA.748@TK2MSFTNGP04.phx.gbl...
>>> i'm used to writing vba in excel, but someone wants some code for outlook.
>>> since
>>> i never use outlook, my question is:
>>>
>>> how do you address the large note field on the general tab of the contact
>>> form?
>>> every other field has a name, this one shows nothing.
>>>
>>> i just want to enter some data in there automatically.
>
>
Back to top
Login to vote
Gary Keramidas

External


Since: Dec 14, 2005
Posts: 8



(Msg. 7) Posted: Tue Aug 07, 2007 10:28 am
Post subject: Re: ol 2003 contacts form questions [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

got it, thanks sue.

--


Gary


"Sue Mosher [MVP-Outlook]" <suemvp RemoveThis @outlookcode.com> wrote in message
news:uc1BvIO2HHA.5796@TK2MSFTNGP05.phx.gbl...
The basic principles work just like Excel: Objects need to be properly
instantiated, and you have to use the property names that the object browser
tells you about, not make up an Application.Item or ContactItem.Bodyitem
property.

First, instantiate your Outlook.Application object:

Set olApp = CreateObject("Outlook.Application")

Then, instantiate the open contact:

Set objMail = olApp.ActiveInspector.CurrentItem

Finally, set the Body property:

objMail.Body = "test"

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Gary Keramidas" <GKeramidasATmsn.com> wrote in message
news:eVDSLWK2HHA.4400@TK2MSFTNGP06.phx.gbl...
> well, it doesn't seem to work anything like excel.
>
> here's what i have and it doesn't work. i just want to add text to the body of
> the open contact.
>
> Sub Add_text()
> Dim olapp As Outlook.Application
> Dim objmail As Outlook.ContactItem
> Set objmail = olapp.Item(olContactItem)
> With objmail
> .Bodyitem = "test"
> End With
> End Sub
>
> --
>
>
> Gary
>
>
> "Sue Mosher [MVP-Outlook]" <suemvp RemoveThis @outlookcode.com> wrote in message
> news:ufAVuHK2HHA.1100@TK2MSFTNGP06.phx.gbl...
> If you look at the object browser in VBA, you'll see that every Outlook item
> object has a Body property, from MailItem to ContactItem, etc., just as every
> item has a Subject property.
>
> "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
> news:O2YcsQJ2HHA.5980@TK2MSFTNGP04.phx.gbl...
>> thanks sue, but isn't body the body of the actual email? if they're both
>> named
>> body, how do you distinguish one from the other?
>>
>> "Sue Mosher [MVP-Outlook]" <suemvp RemoveThis @outlookcode.com> wrote in message
>> news:eI0ERNJ2HHA.4584@TK2MSFTNGP03.phx.gbl...
>> Its name is Body.
>>
>>
>> "Gary Keramidas" <GKeramidasATmsn.com> wrote in message
>> news:Otf$QVG2HHA.748@TK2MSFTNGP04.phx.gbl...
>>> i'm used to writing vba in excel, but someone wants some code for outlook.
>>> since
>>> i never use outlook, my question is:
>>>
>>> how do you address the large note field on the general tab of the contact
>>> form?
>>> every other field has a name, this one shows nothing.
>>>
>>> i just want to enter some data in there automatically.
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 General
 Microsoft Windows XP
 Microsoft Windows Vista
 Microsoft Windows (other)
  Microsoft Office
 Microsoft Office (other)
 Computer Security
 Linux
 Movies


[ Contact us | Terms of Service/Privacy Policy ]