A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Outlook » Contacts
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Address Book



 
 
Thread Tools Display Modes
  #11  
Old June 2nd, 2004, 08:18 PM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default Address Book

You must set Tools | Macro | Security to Low or Medium or leave it set to
High and use the Selfcert.exe tool that comes with Office to sign the
project. Restart Outlook after changing the security level.

The Application_ItemSend event handler must be in the ThisOutlookSession
module.

For troubleshooting, see if you can run any simple Outlook macro, and set a
breakpoint in the Application_ItemSend event handler to see if it's firing.

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


"Roy" wrote in message
...
So, I went to the URL.

I copied the Private Sub Application_ItemSend code to the

ThisOutlookSession module under Project1.

I inserted a new Module and a new Class Module and copied the remainder of

the code in each of those modules.

I downloaded the Redemption file and executed that file. I checked the

SafeOutlookLibrary under Tools/References in Microsoft Visual Basic.

I then Compiled Project1 from the DeBug menu and closed and returned to

Outlook from the File Menu.

After doing all of this, I replied to a message and sent a new message.

But the recepient's e-mail address was not added to my Contact List.

Did I miss a step? Has anyone used this code successfully and can you

detail for me the steps you took to install this code.

If I need to add a name uner Tools Macro what name should I add.

Any help would be greatly appreciated and thank you Russ for all your help

thus far.


----- Russ Valentine [MVP-Outlook] wrote: -----

No.
You can use code to do that if you want:
http://www.outlookcode.com/d/code/autoaddrecip.htm
--
Russ Valentine
[MVP-Outlook]
"Roy" wrote in message
...
The question is, when I reply to an e-mail message shouldn't the

recepient's e-mail address be added to my contacts folder.
If the answere is yes, my e-mail program is not doing that. How

can I get
my e-mail program to do that?



  #12  
Old June 2nd, 2004, 08:56 PM
Roy
external usenet poster
 
Posts: n/a
Default Address Book

I set the Security to Low and I restarted Outlook.

When I went to reply to a message I got the following error.

Run-time error '-1214234619(b7a04005)':
Failed to start the Expression Service. The Expression Service might not be installed. This problem may be resolved by using Detect and Repair on the Help menu or re-running Office XP setup.

The error message has a few button on the bottom "End" "Debug" "Help"

When I click on Debug, it directs me to the Modules Folder under Project1 and highlights the following line with an arrow in the side bar.
Set objContact = colContacts.Find(strFind)

I do not know what this means or how to fix it. Can you please advise?

Also, The Application_ItemSend event handler is in the ThisOutlookSession module.

I do not know how to run a simple Outlook Macro. Can you please tell me how? Also, how do I set a breakpoint in the Application_ItemSend event handler to see if it's firing.

Thank you so much for all your help.




----- Sue Mosher [MVP-Outlook] wrote: -----

You must set Tools | Macro | Security to Low or Medium or leave it set to
High and use the Selfcert.exe tool that comes with Office to sign the
project. Restart Outlook after changing the security level.

The Application_ItemSend event handler must be in the ThisOutlookSession
module.

For troubleshooting, see if you can run any simple Outlook macro, and set a
breakpoint in the Application_ItemSend event handler to see if it's firing.

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


"Roy" wrote in message
...
So, I went to the URL.
I copied the Private Sub Application_ItemSend code to the

ThisOutlookSession module under Project1.
I inserted a new Module and a new Class Module and copied the remainder of

the code in each of those modules.
I downloaded the Redemption file and executed that file. I checked the

SafeOutlookLibrary under Tools/References in Microsoft Visual Basic.
I then Compiled Project1 from the DeBug menu and closed and returned to

Outlook from the File Menu.
After doing all of this, I replied to a message and sent a new message.

But the recepient's e-mail address was not added to my Contact List.
Did I miss a step? Has anyone used this code successfully and can you

detail for me the steps you took to install this code.
If I need to add a name uner Tools Macro what name should I add.
Any help would be greatly appreciated and thank you Russ for all your help

thus far.
----- Russ Valentine [MVP-Outlook] wrote: -----

No.

You can use code to do that if you want:
http://www.outlookcode.com/d/code/autoaddrecip.htm
--
Russ Valentine
[MVP-Outlook]
"Roy" wrote in message
...
The question is, when I reply to an e-mail message shouldn't the

recepient's e-mail address be added to my contacts folder.
If the answere is yes, my e-mail program is not doing that. How

can I get
my e-mail program to do that?

  #13  
Old June 2nd, 2004, 09:22 PM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default Address Book

Did you follow the message's instructions and run Help | Detect and Repair?

YOu can use this as a simple test macro and run it with F5 from the VBA
window:

Sub HelloWorld
MsgBox "Hello World!"
End Sub

To set a breakpoint, position your cursor on the line where you want code
execution to stop, then press F9

Since you're new to Outlook VBA macros, these web pages should help you get
started:

http://www.winnetmag.com/Articles/In...eID=21522&pg=1
http://www.outlookcode.com/d/vb.htm


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


"Roy" wrote in message
...
I set the Security to Low and I restarted Outlook.

When I went to reply to a message I got the following error.

Run-time error '-1214234619(b7a04005)':
Failed to start the Expression Service. The Expression Service might not

be installed. This problem may be resolved by using Detect and Repair on
the Help menu or re-running Office XP setup.

The error message has a few button on the bottom "End" "Debug" "Help"

When I click on Debug, it directs me to the Modules Folder under Project1

and highlights the following line with an arrow in the side bar.
Set objContact = colContacts.Find(strFind)

I do not know what this means or how to fix it. Can you please advise?

Also, The Application_ItemSend event handler is in the ThisOutlookSession

module.

I do not know how to run a simple Outlook Macro. Can you please tell me

how? Also, how do I set a breakpoint in the Application_ItemSend event
handler to see if it's firing.

Thank you so much for all your help.




----- Sue Mosher [MVP-Outlook] wrote: -----

You must set Tools | Macro | Security to Low or Medium or leave it

set to
High and use the Selfcert.exe tool that comes with Office to sign the
project. Restart Outlook after changing the security level.

The Application_ItemSend event handler must be in the

ThisOutlookSession
module.

For troubleshooting, see if you can run any simple Outlook macro, and

set a
breakpoint in the Application_ItemSend event handler to see if it's

firing.

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


"Roy" wrote in message
...
So, I went to the URL.
I copied the Private Sub Application_ItemSend code to

the
ThisOutlookSession module under Project1.
I inserted a new Module and a new Class Module and copied the

remainder of
the code in each of those modules.
I downloaded the Redemption file and executed that file. I

checked the
SafeOutlookLibrary under Tools/References in Microsoft Visual Basic.
I then Compiled Project1 from the DeBug menu and closed and

returned to
Outlook from the File Menu.
After doing all of this, I replied to a message and sent a new

message.
But the recepient's e-mail address was not added to my Contact List.
Did I miss a step? Has anyone used this code successfully and can

you
detail for me the steps you took to install this code.
If I need to add a name uner Tools Macro what name should I add.
Any help would be greatly appreciated and thank you Russ for all

your help
thus far.
----- Russ Valentine [MVP-Outlook] wrote: -----
No.

You can use code to do that if you want:
http://www.outlookcode.com/d/code/autoaddrecip.htm
--
Russ Valentine
[MVP-Outlook]
"Roy" wrote in message
...
The question is, when I reply to an e-mail message shouldn't the

recepient's e-mail address be added to my contacts folder.
If the answere is yes, my e-mail program is not doing that. How

can I get
my e-mail program to do that?



  #14  
Old June 2nd, 2004, 11:11 PM
Roy
external usenet poster
 
Posts: n/a
Default Address Book

I followed the instruction and ran Hel | Detect and Repair? The system said it ran it successfully.

I added your simple test macro to ThisOutlookSession module and ran it with F5 and it ran successfully.

I inserted a breakpoint in the Application_ItemSend at the following line (If Item.Class = olMail Then) and when I tried replying to a message it broke at that line. So the Application_ItemSend eventHandler is firing properly. It would have to fire properly because it was making a method call to AddRecipToContacts.

It is in AddRecipToContacts method that I am getting my error. When the program gets to the routine to check and see if the recipient is already in Contacts it goes through the following code.

strAddress = objSRecip.Address
For i = 1 To 3
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
Set objContact = colContacts.Find(strFind)

At the "Set objContact = colContacts.Find(strFind)" is where the routing gets hung up and displays the runtime error.

So i did a little debuggin for you. I write a little advanced java code so I can follow most codes. I commented out the whole subroutine (check to see if the recipient is already in Contacts). So I commented out the following lines.

' For i = 1 To 3
' strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
' Set objContact = colContacts.Find(strFind)
' If Not objContact Is Nothing Then
' Exit For
' End If
' Next

' if not, add it
' If objContact Is Nothing Then

This way the program would just add users I reply to not checking to see if they exist in the Contacts Folder. This worked successully. It added the user's name and e-mail address I replied to.

Can you help me debug the part of your code I commented out. Is this line of code proper.
strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)


Also, can the AddQuote method belong in the same module or does it have to be in a separate module.

Thanks for all your hlep.



----- Sue Mosher [MVP-Outlook] wrote: -----

Did you follow the message's instructions and run Help | Detect and Repair?

YOu can use this as a simple test macro and run it with F5 from the VBA
window:

Sub HelloWorld
MsgBox "Hello World!"
End Sub

To set a breakpoint, position your cursor on the line where you want code
execution to stop, then press F9

Since you're new to Outlook VBA macros, these web pages should help you get
started:

http://www.winnetmag.com/Articles/In...eID=21522&pg=1
http://www.outlookcode.com/d/vb.htm


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


"Roy" wrote in message
...
I set the Security to Low and I restarted Outlook.
When I went to reply to a message I got the following error.
Run-time error '-1214234619(b7a04005)':

Failed to start the Expression Service. The Expression Service might not

be installed. This problem may be resolved by using Detect and Repair on
the Help menu or re-running Office XP setup.
The error message has a few button on the bottom "End" "Debug" "Help"
When I click on Debug, it directs me to the Modules Folder under Project1

and highlights the following line with an arrow in the side bar.
Set objContact = colContacts.Find(strFind)
I do not know what this means or how to fix it. Can you please advise?
Also, The Application_ItemSend event handler is in the ThisOutlookSession

module.
I do not know how to run a simple Outlook Macro. Can you please tell me

how? Also, how do I set a breakpoint in the Application_ItemSend event
handler to see if it's firing.
Thank you so much for all your help.
----- Sue Mosher [MVP-Outlook] wrote: -----

You must set Tools | Macro | Security to Low or Medium or leave it

set to
High and use the Selfcert.exe tool that comes with Office to sign the
project. Restart Outlook after changing the security level.
The Application_ItemSend event handler must be in the

ThisOutlookSession
module.
For troubleshooting, see if you can run any simple Outlook macro, and

set a
breakpoint in the Application_ItemSend event handler to see if it's

firing.
--

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

...
So, I went to the URL.
I copied the Private Sub Application_ItemSend code to

the
ThisOutlookSession module under Project1.
I inserted a new Module and a new Class Module and copied the

remainder of
the code in each of those modules.
I downloaded the Redemption file and executed that file. I

checked the
SafeOutlookLibrary under Tools/References in Microsoft Visual Basic.
I then Compiled Project1 from the DeBug menu and closed and

returned to
Outlook from the File Menu.
After doing all of this, I replied to a message and sent a new

message.
But the recepient's e-mail address was not added to my Contact List.
Did I miss a step? Has anyone used this code successfully and can

you
detail for me the steps you took to install this code.
If I need to add a name uner Tools Macro what name should I add.
Any help would be greatly appreciated and thank you Russ for all

your help
thus far.
----- Russ Valentine [MVP-Outlook] wrote: -----
No.

You can use code to do that if you want:
http://www.outlookcode.com/d/code/autoaddrecip.htm
--
Russ Valentine
[MVP-Outlook]
"Roy" wrote in message
...
The question is, when I reply to an e-mail message shouldn't the

recepient's e-mail address be added to my contacts folder.
If the answere is yes, my e-mail program is not doing that. How

can I get
my e-mail program to do that?

  #15  
Old June 3rd, 2004, 12:27 AM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default Address Book

What is the value of strFind when you get the error? Are you getting the
same error message you reported earlier or something different?

AddQuote() can be anywhere but needs to be Public if its in another module.

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


"Roy" wrote in message
...
I followed the instruction and ran Hel | Detect and Repair? The system

said it ran it successfully.

I added your simple test macro to ThisOutlookSession module and ran it

with F5 and it ran successfully.

I inserted a breakpoint in the Application_ItemSend at the following line

(If Item.Class = olMail Then) and when I tried replying to a message it
broke at that line. So the Application_ItemSend eventHandler is firing
properly. It would have to fire properly because it was making a method
call to AddRecipToContacts.

It is in AddRecipToContacts method that I am getting my error. When the

program gets to the routine to check and see if the recipient is already in
Contacts it goes through the following code.

strAddress = objSRecip.Address
For i = 1 To 3
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
Set objContact = colContacts.Find(strFind)

At the "Set objContact = colContacts.Find(strFind)" is where the

routing gets hung up and displays the runtime error.

So i did a little debuggin for you. I write a little advanced java code

so I can follow most codes. I commented out the whole subroutine (check
to see if the recipient is already in Contacts). So I commented out the
following lines.

' For i = 1 To 3
' strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
' Set objContact = colContacts.Find(strFind)
' If Not objContact Is Nothing Then
' Exit For
' End If
' Next

' if not, add it
' If objContact Is Nothing Then

This way the program would just add users I reply to not checking to see

if they exist in the Contacts Folder. This worked successully. It added
the user's name and e-mail address I replied to.

Can you help me debug the part of your code I commented out. Is this line

of code proper.
strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)


Also, can the AddQuote method belong in the same module or does it have to

be in a separate module.

Thanks for all your hlep.



"Roy" wrote in message
...
I set the Security to Low and I restarted Outlook.
When I went to reply to a message I got the following error.
Run-time error '-1214234619(b7a04005)':

Failed to start the Expression Service. The Expression Service

might not
be installed. This problem may be resolved by using Detect and

Repair on
the Help menu or re-running Office XP setup.
The error message has a few button on the bottom "End" "Debug"

"Help"
When I click on Debug, it directs me to the Modules Folder under

Project1
and highlights the following line with an arrow in the side bar.
Set objContact = colContacts.Find(strFind)
I do not know what this means or how to fix it. Can you please

advise?
Also, The Application_ItemSend event handler is in the

ThisOutlookSession
module.
I do not know how to run a simple Outlook Macro. Can you please

tell me
how? Also, how do I set a breakpoint in the Application_ItemSend

event
handler to see if it's firing.
Thank you so much for all your help.
----- Sue Mosher [MVP-Outlook] wrote: -----
You must set Tools | Macro | Security to Low or Medium or

leave it
set to
High and use the Selfcert.exe tool that comes with Office to

sign the
project. Restart Outlook after changing the security level.
The Application_ItemSend event handler must be in the

ThisOutlookSession
module.
For troubleshooting, see if you can run any simple Outlook

macro, and
set a
breakpoint in the Application_ItemSend event handler to see if

it's
firing.



  #16  
Old June 3rd, 2004, 01:01 AM
Roy
external usenet poster
 
Posts: n/a
Default Address Book

I get the same error message

The Run-time errors bunbers are differenct but the message is still the same. The message states
Failed to start the Expression Service. The Expression Service might not be installed. This problem may be resolved by using Detect and Repair on the Help menu or re-running Office XP setup.

I was trying to put " Debug.Print i & strFind" right after
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)


but I got no output.

Ideally I would like to have used MsgBox strFind. But I do not know if this will work.

I tried to comment as many lines out and try to further narrow down the line of code that spits ou the error. It seems to be the line of code that is causing the error is :
Set objContact = colContacts.Find(strFind) .

I have no idea what this line of code means nor can I pull it up on Google Search. The only search items I get on colContacts.Find() are all code written by you.

Would be nice to be able to find out what the value of strFind is after each iteration. Should be coming up blank.

Any adivce????


----- Sue Mosher [MVP-Outlook] wrote: -----

What is the value of strFind when you get the error? Are you getting the
same error message you reported earlier or something different?

AddQuote() can be anywhere but needs to be Public if its in another module.

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


"Roy" wrote in message
...
I followed the instruction and ran Hel | Detect and Repair? The system

said it ran it successfully.
I added your simple test macro to ThisOutlookSession module and ran it

with F5 and it ran successfully.
I inserted a breakpoint in the Application_ItemSend at the following line

(If Item.Class = olMail Then) and when I tried replying to a message it
broke at that line. So the Application_ItemSend eventHandler is firing
properly. It would have to fire properly because it was making a method
call to AddRecipToContacts.
It is in AddRecipToContacts method that I am getting my error. When the

program gets to the routine to check and see if the recipient is already in
Contacts it goes through the following code.
strAddress = objSRecip.Address

For i = 1 To 3
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
Set objContact = colContacts.Find(strFind)
At the "Set objContact = colContacts.Find(strFind)" is where the

routing gets hung up and displays the runtime error.
So i did a little debuggin for you. I write a little advanced java code

so I can follow most codes. I commented out the whole subroutine (check
to see if the recipient is already in Contacts). So I commented out the
following lines.
' For i = 1 To 3

' strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
' Set objContact = colContacts.Find(strFind)
' If Not objContact Is Nothing Then
' Exit For
' End If
' Next
' if not, add it

' If objContact Is Nothing Then
This way the program would just add users I reply to not checking to see

if they exist in the Contacts Folder. This worked successully. It added
the user's name and e-mail address I replied to.
Can you help me debug the part of your code I commented out. Is this line

of code proper.
strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
Also, can the AddQuote method belong in the same module or does it have to

be in a separate module.
Thanks for all your hlep.
"Roy" wrote in message

...
I set the Security to Low and I restarted Outlook.
When I went to reply to a message I got the following error.
Run-time error '-1214234619(b7a04005)':

Failed to start the Expression Service. The Expression Service

might not
be installed. This problem may be resolved by using Detect and

Repair on
the Help menu or re-running Office XP setup.
The error message has a few button on the bottom "End" "Debug"

"Help"
When I click on Debug, it directs me to the Modules Folder under

Project1
and highlights the following line with an arrow in the side bar.
Set objContact = colContacts.Find(strFind)
I do not know what this means or how to fix it. Can you please

advise?
Also, The Application_ItemSend event handler is in the

ThisOutlookSession
module.
I do not know how to run a simple Outlook Macro. Can you please

tell me
how? Also, how do I set a breakpoint in the Application_ItemSend

event
handler to see if it's firing.
Thank you so much for all your help.
----- Sue Mosher [MVP-Outlook] wrote: -----
You must set Tools | Macro | Security to Low or Medium or

leave it
set to
High and use the Selfcert.exe tool that comes with Office to

sign the
project. Restart Outlook after changing the security level.
The Application_ItemSend event handler must be in the

ThisOutlookSession
module.
For troubleshooting, see if you can run any simple Outlook

macro, and
set a
breakpoint in the Application_ItemSend event handler to see if

it's
firing.

  #17  
Old June 3rd, 2004, 02:07 AM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default Address Book

When in doubt about a property or method, 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.

If i is declared as an Integer, try converting it to a string:

strFind = "[Email" & Format(i) & "Address] = " & _
AddQuote(strAddress)
Debug.Print strFind

Something else to try: Locate the file Expsrv.dll on your hard drive.
Rename it, then try Detect and Repair again. The instructions in the KB
article at http://support.microsoft.com/default...b;en-us;239114
might also be helpful.

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


"Roy" wrote in message
news
I get the same error message

The Run-time errors bunbers are differenct but the message is still the
same. The message states
Failed to start the Expression Service. The Expression Service might not

be installed. This problem may be resolved by using Detect and Repair on
the Help menu or re-running Office XP setup.

I was trying to put " Debug.Print i & strFind" right after
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)


but I got no output.

Ideally I would like to have used MsgBox strFind. But I do not know if

this will work.

I tried to comment as many lines out and try to further narrow down the

line of code that spits ou the error. It seems to be the line of code that
is causing the error is :
Set objContact = colContacts.Find(strFind) .

I have no idea what this line of code means nor can I pull it up on Google

Search. The only search items I get on colContacts.Find() are all code
written by you.

Would be nice to be able to find out what the value of strFind is after

each iteration. Should be coming up blank.

Any adivce????


----- Sue Mosher [MVP-Outlook] wrote: -----

What is the value of strFind when you get the error? Are you getting

the
same error message you reported earlier or something different?

AddQuote() can be anywhere but needs to be Public if it's in another

module.




"Roy" wrote in message
...
I followed the instruction and ran Hel | Detect and Repair? The

system
said it ran it successfully.
I added your simple test macro to ThisOutlookSession module and

ran it
with F5 and it ran successfully.
I inserted a breakpoint in the Application_ItemSend at the

following line
(If Item.Class = olMail Then) and when I tried replying to a message

it
broke at that line. So the Application_ItemSend eventHandler is

firing
properly. It would have to fire properly because it was making a

method
call to AddRecipToContacts.
It is in AddRecipToContacts method that I am getting my error.

When the
program gets to the routine to check and see if the recipient is

already in
Contacts it goes through the following code.
strAddress = objSRecip.Address

For i = 1 To 3
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
Set objContact = colContacts.Find(strFind)
At the "Set objContact = colContacts.Find(strFind)" is where

the
routing gets hung up and displays the runtime error.
So i did a little debuggin for you. I write a little advanced

java code
so I can follow most codes. I commented out the whole subroutine

(check
to see if the recipient is already in Contacts). So I commented out

the
following lines.
' For i = 1 To 3

' strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
' Set objContact = colContacts.Find(strFind)
' If Not objContact Is Nothing Then
' Exit For
' End If
' Next
' if not, add it

' If objContact Is Nothing Then
This way the program would just add users I reply to not checking

to see
if they exist in the Contacts Folder. This worked successully. It

added
the user's name and e-mail address I replied to.
Can you help me debug the part of your code I commented out. Is

this line
of code proper.
strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
Also, can the AddQuote method belong in the same module or does

it have to
be in a separate module.
Thanks for all your hlep.
"Roy" wrote in message

...
I set the Security to Low and I restarted Outlook.
When I went to reply to a message I got the following error.
Run-time error '-1214234619(b7a04005)':
Failed to start the Expression Service. The Expression Service

might not
be installed. This problem may be resolved by using Detect

and
Repair on
the Help menu or re-running Office XP setup.
The error message has a few button on the bottom "End" "Debug"

"Help"
When I click on Debug, it directs me to the Modules Folder under

Project1
and highlights the following line with an arrow in the side

bar.
Set objContact = colContacts.Find(strFind)
I do not know what this means or how to fix it. Can you please

advise?
Also, The Application_ItemSend event handler is in the

ThisOutlookSession
module.
I do not know how to run a simple Outlook Macro. Can you please

tell me
how? Also, how do I set a breakpoint in the

Application_ItemSend
event
handler to see if it's firing.
Thank you so much for all your help.
----- Sue Mosher [MVP-Outlook] wrote: -----
You must set Tools | Macro | Security to Low or Medium or

leave it
set to
High and use the Selfcert.exe tool that comes with Office to

sign the
project. Restart Outlook after changing the security level.
The Application_ItemSend event handler must be in the

ThisOutlookSession
module.
For troubleshooting, see if you can run any simple Outlook

macro, and
set a
breakpoint in the Application_ItemSend event handler to see

if
it's
firing.



  #18  
Old June 3rd, 2004, 03:01 AM
Roy
external usenet poster
 
Posts: n/a
Default Address Book

2 questions

1) Debug.Print should be able to print integers so I do not see the reason behind changing i to a String.
Even if I input the Debug.Print line in the code, will it show up by me just replying to a message. I do not know how to just run the sub routine AddRecipToContacts() In the Visual Basic Editor and have it show me the values for different variables.

2) What will changing the name Expsrv.dll on my hard drive do? How does Jet4.0 come in to play? Is the Contacts Folder using Jet 4.0 as its databse engine?
BTW, Expsrv.dll shows up in 3 different places on my hard drive. Do I have to change the name in all 3 places.
c:\winnt\$NTUninstallKB837001$
C:\winnt\ServicePackFiles\i386
c:\winnt\system32

----- Sue Mosher [MVP-Outlook] wrote: -----

When in doubt about a property or method, 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.

If i is declared as an Integer, try converting it to a string:

strFind = "[Email" & Format(i) & "Address] = " & _
AddQuote(strAddress)
Debug.Print strFind

Something else to try: Locate the file Expsrv.dll on your hard drive.
Rename it, then try Detect and Repair again. The instructions in the KB
article at http://support.microsoft.com/default...b;en-us;239114
might also be helpful.

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


"Roy" wrote in message
news
I get the same error message
The Run-time errors bunbers are differenct but the message is still the

same. The message states
Failed to start the Expression Service. The Expression Service might not

be installed. This problem may be resolved by using Detect and Repair on
the Help menu or re-running Office XP setup.
I was trying to put " Debug.Print i & strFind" right after

strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
but I got no output.
Ideally I would like to have used MsgBox strFind. But I do not know if

this will work.
I tried to comment as many lines out and try to further narrow down the

line of code that spits ou the error. It seems to be the line of code that
is causing the error is :
Set objContact = colContacts.Find(strFind) .
I have no idea what this line of code means nor can I pull it up on Google

Search. The only search items I get on colContacts.Find() are all code
written by you.
Would be nice to be able to find out what the value of strFind is after

each iteration. Should be coming up blank.
Any adivce????
----- Sue Mosher [MVP-Outlook] wrote: -----

What is the value of strFind when you get the error? Are you getting

the
same error message you reported earlier or something different?
AddQuote() can be anywhere but needs to be Public if it's in another

module.
"Roy" wrote in message

...
I followed the instruction and ran Hel | Detect and Repair? The

system
said it ran it successfully.
I added your simple test macro to ThisOutlookSession module and

ran it
with F5 and it ran successfully.
I inserted a breakpoint in the Application_ItemSend at the

following line
(If Item.Class = olMail Then) and when I tried replying to a message

it
broke at that line. So the Application_ItemSend eventHandler is

firing
properly. It would have to fire properly because it was making a

method
call to AddRecipToContacts.
It is in AddRecipToContacts method that I am getting my error.

When the
program gets to the routine to check and see if the recipient is

already in
Contacts it goes through the following code.
strAddress = objSRecip.Address

For i = 1 To 3
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
Set objContact = colContacts.Find(strFind)
At the "Set objContact = colContacts.Find(strFind)" is where

the
routing gets hung up and displays the runtime error.
So i did a little debuggin for you. I write a little advanced

java code
so I can follow most codes. I commented out the whole subroutine

(check
to see if the recipient is already in Contacts). So I commented out

the
following lines.
' For i = 1 To 3

' strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
' Set objContact = colContacts.Find(strFind)
' If Not objContact Is Nothing Then
' Exit For
' End If
' Next
' if not, add it

' If objContact Is Nothing Then
This way the program would just add users I reply to not checking

to see
if they exist in the Contacts Folder. This worked successully. It

added
the user's name and e-mail address I replied to.
Can you help me debug the part of your code I commented out. Is

this line
of code proper.
strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
Also, can the AddQuote method belong in the same module or does

it have to
be in a separate module.
Thanks for all your hlep.
"Roy" wrote in message

...
I set the Security to Low and I restarted Outlook.
When I went to reply to a message I got the following error.
Run-time error '-1214234619(b7a04005)':
Failed to start the Expression Service. The Expression Service

might not
be installed. This problem may be resolved by using Detect

and
Repair on
the Help menu or re-running Office XP setup.
The error message has a few button on the bottom "End" "Debug"

"Help"
When I click on Debug, it directs me to the Modules Folder under

Project1
and highlights the following line with an arrow in the side

bar.
Set objContact = colContacts.Find(strFind)
I do not know what this means or how to fix it. Can you please

advise?
Also, The Application_ItemSend event handler is in the

ThisOutlookSession
module.
I do not know how to run a simple Outlook Macro. Can you please

tell me
how? Also, how do I set a breakpoint in the

Application_ItemSend
event
handler to see if it's firing.
Thank you so much for all your help.
----- Sue Mosher [MVP-Outlook] wrote: -----
You must set Tools | Macro | Security to Low or Medium or

leave it
set to
High and use the Selfcert.exe tool that comes with Office to

sign the
project. Restart Outlook after changing the security level.
The Application_ItemSend event handler must be in the

ThisOutlookSession
module.
For troubleshooting, see if you can run any simple Outlook

macro, and
set a
breakpoint in the Application_ItemSend event handler to see

if
it's
firing.

  #19  
Old June 3rd, 2004, 04:34 AM
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: n/a
Default Address Book

1) I'm not concerned about debug.printing integers but showing the value of
the string expression that you're building from an integer and several
strings. You can step through your code with F8 after it hits the breakpoint
if you want to see how it's executing.

2) As far as I can tell, Expsrv.dll runs the Expression Service. Only the
copy in System32 matters. What operating system are you using?

Can you type this in the Immediate window, press Enter and get a result? --

? AddQuote("this text")
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Roy" wrote in message
...
2 questions

1) Debug.Print should be able to print integers so I do not see the reason

behind changing i to a String.
Even if I input the Debug.Print line in the code, will it show up by me

just replying to a message. I do not know how to just run the sub routine
AddRecipToContacts() In the Visual Basic Editor and have it show me the
values for different variables.

2) What will changing the name Expsrv.dll on my hard drive do? How does

Jet4.0 come in to play? Is the Contacts Folder using Jet 4.0 as its databse
engine?
BTW, Expsrv.dll shows up in 3 different places on my hard drive. Do I

have to change the name in all 3 places.
c:\winnt\$NTUninstallKB837001$
C:\winnt\ServicePackFiles\i386
c:\winnt\system32

----- Sue Mosher [MVP-Outlook] wrote: -----

When in doubt about a property or method, 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.

If i is declared as an Integer, try converting it to a string:

strFind = "[Email" & Format(i) & "Address] = " & _
AddQuote(strAddress)
Debug.Print strFind

Something else to try: Locate the file Expsrv.dll on your hard

drive.
Rename it, then try Detect and Repair again. The instructions in the

KB
article at

http://support.microsoft.com/default...b;en-us;239114
might also be helpful.

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


"Roy" wrote in message
news
I get the same error message
The Run-time errors bunbers are differenct but the message is

still the
same. The message states
Failed to start the Expression Service. The Expression Service

might not
be installed. This problem may be resolved by using Detect and

Repair on
the Help menu or re-running Office XP setup.
I was trying to put " Debug.Print i & strFind" right after

strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
but I got no output.
Ideally I would like to have used MsgBox strFind. But I do not

know if
this will work.
I tried to comment as many lines out and try to further narrow

down the
line of code that spits ou the error. It seems to be the line of

code that
is causing the error is :
Set objContact = colContacts.Find(strFind) .
I have no idea what this line of code means nor can I pull it up

on Google
Search. The only search items I get on colContacts.Find() are all

code
written by you.
Would be nice to be able to find out what the value of strFind is

after
each iteration. Should be coming up blank.
Any adivce????
----- Sue Mosher [MVP-Outlook] wrote: -----
What is the value of strFind when you get the error? Are you

getting
the
same error message you reported earlier or something

different?
AddQuote() can be anywhere but needs to be Public if it's in

another
module.
"Roy" wrote in

message
...
I followed the instruction and ran Hel | Detect and Repair? The

system
said it ran it successfully.
I added your simple test macro to ThisOutlookSession module and

ran it
with F5 and it ran successfully.
I inserted a breakpoint in the Application_ItemSend at the

following line
(If Item.Class = olMail Then) and when I tried replying to a

message
it
broke at that line. So the Application_ItemSend eventHandler

is
firing
properly. It would have to fire properly because it was

making a
method
call to AddRecipToContacts.
It is in AddRecipToContacts method that I am getting my error.

When the
program gets to the routine to check and see if the recipient

is
already in
Contacts it goes through the following code.
strAddress = objSRecip.Address
For i = 1 To 3
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
Set objContact = colContacts.Find(strFind)
At the "Set objContact = colContacts.Find(strFind)" is where

the
routing gets hung up and displays the runtime error.
So i did a little debuggin for you. I write a little advanced

java code
so I can follow most codes. I commented out the whole

subroutine
(check
to see if the recipient is already in Contacts). So I

commented out
the
following lines.
' For i = 1 To 3
' strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
' Set objContact = colContacts.Find(strFind)
' If Not objContact Is Nothing Then
' Exit For
' End If
' Next
' if not, add it
' If objContact Is Nothing Then
This way the program would just add users I reply to not checking

to see
if they exist in the Contacts Folder. This worked

successully. It
added
the user's name and e-mail address I replied to.
Can you help me debug the part of your code I commented out. Is

this line
of code proper.
strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
Also, can the AddQuote method belong in the same module or does

it have to
be in a separate module.
Thanks for all your hlep.
"Roy" wrote in

message
...
I set the Security to Low and I restarted Outlook.
When I went to reply to a message I got the following error.
Run-time error '-1214234619(b7a04005)':
Failed to start the Expression Service. The Expression Service

might not
be installed. This problem may be resolved by using Detect

and
Repair on
the Help menu or re-running Office XP setup.
The error message has a few button on the bottom "End" "Debug"

"Help"
When I click on Debug, it directs me to the Modules Folder under

Project1
and highlights the following line with an arrow in the side

bar.
Set objContact = colContacts.Find(strFind)
I do not know what this means or how to fix it. Can you please

advise?
Also, The Application_ItemSend event handler is in the

ThisOutlookSession
module.
I do not know how to run a simple Outlook Macro. Can you please

tell me
how? Also, how do I set a breakpoint in the

Application_ItemSend
event
handler to see if it's firing.
Thank you so much for all your help.
----- Sue Mosher [MVP-Outlook] wrote: -----
You must set Tools | Macro | Security to Low or Medium or

leave it
set to
High and use the Selfcert.exe tool that comes with Office to

sign the
project. Restart Outlook after changing the security level.
The Application_ItemSend event handler must be in the
ThisOutlookSession
module.
For troubleshooting, see if you can run any simple Outlook

macro, and
set a
breakpoint in the Application_ItemSend event handler to see

if
it's
firing.



  #20  
Old June 3rd, 2004, 07:26 AM
Roy
external usenet poster
 
Posts: n/a
Default Address Book

I am using Window 2000 Profession as my operating system.

I typed ? AddQuote("this text") in the Immediate Window and hit Enter and got "this text" back.

BTW, I inserted the Debug.Print strFind, put in a breakpoint at that line and replied to a message. When it hit the breakpoint, I pressed F8 and it displayed [Email1Address] = " which is correct. Then I pressed F8 again and it gave me the same error Failed to Start the Expression Service.

I downloaded Jet 4.0 Sp8 for Windows 2000 and installed it on my system.

When I tried to reply to a message got the same error.

I renamed the expsrv.dll in c:\winnt\system32 to roy and then in Outlook ran Help | Detect & Reapir. It said Office XP Professional ran successfully. The file expsrv.dll reappeared in c:\winnt\system32.

Replied to a message got the same error. Failed to start Expression Service.

Any advice on what I should do next to try and resolve this problem?????



----- Sue Mosher [MVP-Outlook] wrote: -----

1) I'm not concerned about debug.printing integers but showing the value of
the string expression that you're building from an integer and several
strings. You can step through your code with F8 after it hits the breakpoint
if you want to see how it's executing.

2) As far as I can tell, Expsrv.dll runs the Expression Service. Only the
copy in System32 matters. What operating system are you using?

Can you type this in the Immediate window, press Enter and get a result? --

? AddQuote("this text")
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Roy" wrote in message
...
2 questions
1) Debug.Print should be able to print integers so I do not see the reason

behind changing i to a String.
Even if I input the Debug.Print line in the code, will it show up by me

just replying to a message. I do not know how to just run the sub routine
AddRecipToContacts() In the Visual Basic Editor and have it show me the
values for different variables.
2) What will changing the name Expsrv.dll on my hard drive do? How does

Jet4.0 come in to play? Is the Contacts Folder using Jet 4.0 as its databse
engine?
BTW, Expsrv.dll shows up in 3 different places on my hard drive. Do I

have to change the name in all 3 places.
c:\winnt\$NTUninstallKB837001$
C:\winnt\ServicePackFiles\i386
c:\winnt\system32
----- Sue Mosher [MVP-Outlook] wrote: -----
When in doubt about a property or method, 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.
If i is declared as an Integer, try converting it to a string:
strFind = "[Email" & Format(i) & "Address] = " & _

AddQuote(strAddress)
Debug.Print strFind
Something else to try: Locate the file Expsrv.dll on your hard

drive.
Rename it, then try Detect and Repair again. The instructions in the

KB
article at

http://support.microsoft.com/default...b;en-us;239114
might also be helpful.
--

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

news
I get the same error message
The Run-time errors bunbers are differenct but the message is

still the
same. The message states
Failed to start the Expression Service. The Expression Service

might not
be installed. This problem may be resolved by using Detect and

Repair on
the Help menu or re-running Office XP setup.
I was trying to put " Debug.Print i & strFind" right after

strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
but I got no output.
Ideally I would like to have used MsgBox strFind. But I do not

know if
this will work.
I tried to comment as many lines out and try to further narrow

down the
line of code that spits ou the error. It seems to be the line of

code that
is causing the error is :
Set objContact = colContacts.Find(strFind) .
I have no idea what this line of code means nor can I pull it up

on Google
Search. The only search items I get on colContacts.Find() are all

code
written by you.
Would be nice to be able to find out what the value of strFind is

after
each iteration. Should be coming up blank.
Any adivce????
----- Sue Mosher [MVP-Outlook] wrote: -----
What is the value of strFind when you get the error? Are you

getting
the
same error message you reported earlier or something

different?
AddQuote() can be anywhere but needs to be Public if it's in

another
module.
"Roy" wrote in

message
...
I followed the instruction and ran Hel | Detect and Repair? The

system
said it ran it successfully.
I added your simple test macro to ThisOutlookSession module and

ran it
with F5 and it ran successfully.
I inserted a breakpoint in the Application_ItemSend at the

following line
(If Item.Class = olMail Then) and when I tried replying to a

message
it
broke at that line. So the Application_ItemSend eventHandler

is
firing
properly. It would have to fire properly because it was

making a
method
call to AddRecipToContacts.
It is in AddRecipToContacts method that I am getting my error.

When the
program gets to the routine to check and see if the recipient

is
already in
Contacts it goes through the following code.
strAddress = objSRecip.Address
For i = 1 To 3
strFind = "[Email" & i & "Address] = " & _
AddQuote(strAddress)
Set objContact = colContacts.Find(strFind)
At the "Set objContact = colContacts.Find(strFind)" is where

the
routing gets hung up and displays the runtime error.
So i did a little debuggin for you. I write a little advanced

java code
so I can follow most codes. I commented out the whole

subroutine
(check
to see if the recipient is already in Contacts). So I

commented out
the
following lines.
' For i = 1 To 3
' strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
' Set objContact = colContacts.Find(strFind)
' If Not objContact Is Nothing Then
' Exit For
' End If
' Next
' if not, add it
' If objContact Is Nothing Then
This way the program would just add users I reply to not checking

to see
if they exist in the Contacts Folder. This worked

successully. It
added
the user's name and e-mail address I replied to.
Can you help me debug the part of your code I commented out. Is

this line
of code proper.
strFind = "[Email" & i & "Address] = " & _
' AddQuote(strAddress)
Also, can the AddQuote method belong in the same module or does

it have to
be in a separate module.
Thanks for all your hlep.
"Roy" wrote in

message
...
I set the Security to Low and I restarted Outlook.
When I went to reply to a message I got the following error.
Run-time error '-1214234619(b7a04005)':
Failed to start the Expression Service. The Expression Service

might not
be installed. This problem may be resolved by using Detect

and
Repair on
the Help menu or re-running Office XP setup.
The error message has a few button on the bottom "End" "Debug"

"Help"
When I click on Debug, it directs me to the Modules Folder under

Project1
and highlights the following line with an arrow in the side

bar.
Set objContact = colContacts.Find(strFind)
I do not know what this means or how to fix it. Can you please

advise?
Also, The Application_ItemSend event handler is in the

ThisOutlookSession
module.
I do not know how to run a simple Outlook Macro. Can you please

tell me
how? Also, how do I set a breakpoint in the

Application_ItemSend
event
handler to see if it's firing.
Thank you so much for all your help.
----- Sue Mosher [MVP-Outlook] wrote: -----
You must set Tools | Macro | Security to Low or Medium or

leave it
set to
High and use the Selfcert.exe tool that comes with Office to

sign the
project. Restart Outlook after changing the security level.
The Application_ItemSend event handler must be in the
ThisOutlookSession
module.
For troubleshooting, see if you can run any simple Outlook

macro, and
set a
breakpoint in the Application_ItemSend event handler to see

if
it's
firing.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.