A Microsoft Outlook email forum. Outlook Banter

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 » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: ,

Retrieving information





 
 
Thread Tools Display Modes
  #1  
Old March 19th 08, 11:56 PM posted to microsoft.public.outlook.program_forms
Donteathecheese
external usenet poster
 
Posts: 3
Default Retrieving information

I have been assigned to create a form for the company I work for and I have
ran into a few problems with some of the things I want to do. The form I am
creating is a request form, and shippment form.

I wanted the person that was sending the form to be able to go into their
contacts and select a person. After the person has been selected I wanted the
street address, city, state and zip to come into field within the form.

I also wanted the subject box to be autofilled in as fields are inputed.
here is some of my code.
Sub jobName_CustomPropertyChange(ByVal Text)
With Me
Set .jobNumber.text = .jobName.Text
End With
End Sub

This didnt seem to work and I was not sure why.

I also wanted to be able to press a button and send a reply back saying that
the shipment has been taken care of and I was completely lost on this.

If anyone could help me with these things or point me in the right direction
that would be greatly appreicated. Maybe even a book recommendations would be
greatly appreciated.

--Zac

Ads
  #2  
Old March 20th 08, 03:38 PM posted to microsoft.public.outlook.program_forms
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 810
Default Retrieving information

The only way to grab the info from a selected Contact is to grab the
ActiveExplorer.Selection object, ensuring that only one item is selected and
that it is a Contact item. However, the process wouldn't be perfect as the
user would need to click a button on your form to tell your code that they
have effectively chosen the Contact already. You could get fancy with the
Explorer.SelectionChange event, but that could be tricky.

Your procedure stub is incorrect - it should be Sub Item_CustomPropertyChange.

To send a reply, just create a new mail item using
Application.CreateItem(olMailItem), set the properties of the returned object
and call .Send.

For more info on Outlook programming and a great book, see
http://www.outlookcode.com.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Donteathecheese" wrote:

I have been assigned to create a form for the company I work for and I have
ran into a few problems with some of the things I want to do. The form I am
creating is a request form, and shippment form.

I wanted the person that was sending the form to be able to go into their
contacts and select a person. After the person has been selected I wanted the
street address, city, state and zip to come into field within the form.

I also wanted the subject box to be autofilled in as fields are inputed.
here is some of my code.
Sub jobName_CustomPropertyChange(ByVal Text)
With Me
Set .jobNumber.text = .jobName.Text
End With
End Sub

This didnt seem to work and I was not sure why.

I also wanted to be able to press a button and send a reply back saying that
the shipment has been taken care of and I was completely lost on this.

If anyone could help me with these things or point me in the right direction
that would be greatly appreicated. Maybe even a book recommendations would be
greatly appreciated.

--Zac

  #3  
Old March 20th 08, 09:21 PM posted to microsoft.public.outlook.program_forms
Donteathecheese
external usenet poster
 
Posts: 3
Default Retrieving information

I thought that in the Sub Item_CustomPropertyChange syntax you replace Item
with the control you wanted to reference. In my example I wanted the subject
to change when one of the controls to change. Maybe I am a little unclear on
this. I have tried to look up example codes and or forums but I cant seem to
actually get anything that works to look at for examples. Any thoughts would
be great. I think that I might try and get one of the books from the website
you recommended. Just wanted to add thanks for the quick reply.

"Eric Legault [MVP - Outlook]" wrote:

The only way to grab the info from a selected Contact is to grab the
ActiveExplorer.Selection object, ensuring that only one item is selected and
that it is a Contact item. However, the process wouldn't be perfect as the
user would need to click a button on your form to tell your code that they
have effectively chosen the Contact already. You could get fancy with the
Explorer.SelectionChange event, but that could be tricky.

Your procedure stub is incorrect - it should be Sub Item_CustomPropertyChange.

To send a reply, just create a new mail item using
Application.CreateItem(olMailItem), set the properties of the returned object
and call .Send.

For more info on Outlook programming and a great book, see
http://www.outlookcode.com.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Donteathecheese" wrote:

I have been assigned to create a form for the company I work for and I have
ran into a few problems with some of the things I want to do. The form I am
creating is a request form, and shippment form.

I wanted the person that was sending the form to be able to go into their
contacts and select a person. After the person has been selected I wanted the
street address, city, state and zip to come into field within the form.

I also wanted the subject box to be autofilled in as fields are inputed.
here is some of my code.
Sub jobName_CustomPropertyChange(ByVal Text)
With Me
Set .jobNumber.text = .jobName.Text
End With
End Sub

This didnt seem to work and I was not sure why.

I also wanted to be able to press a button and send a reply back saying that
the shipment has been taken care of and I was completely lost on this.

If anyone could help me with these things or point me in the right direction
that would be greatly appreicated. Maybe even a book recommendations would be
greatly appreciated.

--Zac

  #4  
Old March 20th 08, 09:29 PM posted to microsoft.public.outlook.program_forms
Guest
 
Posts: n/a
Default Retrieving information

No, that event fires for all custom properties. The name of the property
that caused the event is passed in the Name argument.

Eric

"Donteathecheese" wrote in
message ...
I thought that in the Sub Item_CustomPropertyChange syntax you replace Item
with the control you wanted to reference. In my example I wanted the
subject
to change when one of the controls to change. Maybe I am a little unclear
on
this. I have tried to look up example codes and or forums but I cant seem
to
actually get anything that works to look at for examples. Any thoughts
would
be great. I think that I might try and get one of the books from the
website
you recommended. Just wanted to add thanks for the quick reply.

"Eric Legault [MVP - Outlook]" wrote:

The only way to grab the info from a selected Contact is to grab the
ActiveExplorer.Selection object, ensuring that only one item is selected
and
that it is a Contact item. However, the process wouldn't be perfect as
the
user would need to click a button on your form to tell your code that
they
have effectively chosen the Contact already. You could get fancy with
the
Explorer.SelectionChange event, but that could be tricky.

Your procedure stub is incorrect - it should be Sub
Item_CustomPropertyChange.

To send a reply, just create a new mail item using
Application.CreateItem(olMailItem), set the properties of the returned
object
and call .Send.

For more info on Outlook programming and a great book, see
http://www.outlookcode.com.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Donteathecheese" wrote:

I have been assigned to create a form for the company I work for and I
have
ran into a few problems with some of the things I want to do. The form
I am
creating is a request form, and shippment form.

I wanted the person that was sending the form to be able to go into
their
contacts and select a person. After the person has been selected I
wanted the
street address, city, state and zip to come into field within the form.

I also wanted the subject box to be autofilled in as fields are
inputed.
here is some of my code.
Sub jobName_CustomPropertyChange(ByVal Text)
With Me
Set .jobNumber.text = .jobName.Text
End With
End Sub

This didnt seem to work and I was not sure why.

I also wanted to be able to press a button and send a reply back saying
that
the shipment has been taken care of and I was completely lost on this.

If anyone could help me with these things or point me in the right
direction
that would be greatly appreicated. Maybe even a book recommendations
would be
greatly appreciated.

--Zac


  #5  
Old March 20th 08, 10:16 PM posted to microsoft.public.outlook.program_forms
Donteathecheese
external usenet poster
 
Posts: 3
Default Retrieving information

I have tried this and it still didnt seem to work. Not quite sure why

Sub item_CustomPropertyChange(ByVal jobName)
With Me
jobNumber.Text = jobName.Text
End With
End Sub


" wrote:

No, that event fires for all custom properties. The name of the property
that caused the event is passed in the Name argument.

Eric

"Donteathecheese" wrote in
message ...
I thought that in the Sub Item_CustomPropertyChange syntax you replace Item
with the control you wanted to reference. In my example I wanted the
subject
to change when one of the controls to change. Maybe I am a little unclear
on
this. I have tried to look up example codes and or forums but I cant seem
to
actually get anything that works to look at for examples. Any thoughts
would
be great. I think that I might try and get one of the books from the
website
you recommended. Just wanted to add thanks for the quick reply.

"Eric Legault [MVP - Outlook]" wrote:

The only way to grab the info from a selected Contact is to grab the
ActiveExplorer.Selection object, ensuring that only one item is selected
and
that it is a Contact item. However, the process wouldn't be perfect as
the
user would need to click a button on your form to tell your code that
they
have effectively chosen the Contact already. You could get fancy with
the
Explorer.SelectionChange event, but that could be tricky.

Your procedure stub is incorrect - it should be Sub
Item_CustomPropertyChange.

To send a reply, just create a new mail item using
Application.CreateItem(olMailItem), set the properties of the returned
object
and call .Send.

For more info on Outlook programming and a great book, see
http://www.outlookcode.com.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Donteathecheese" wrote:

I have been assigned to create a form for the company I work for and I
have
ran into a few problems with some of the things I want to do. The form
I am
creating is a request form, and shippment form.

I wanted the person that was sending the form to be able to go into
their
contacts and select a person. After the person has been selected I
wanted the
street address, city, state and zip to come into field within the form.

I also wanted the subject box to be autofilled in as fields are
inputed.
here is some of my code.
Sub jobName_CustomPropertyChange(ByVal Text)
With Me
Set .jobNumber.text = .jobName.Text
End With
End Sub

This didnt seem to work and I was not sure why.

I also wanted to be able to press a button and send a reply back saying
that
the shipment has been taken care of and I was completely lost on this.

If anyone could help me with these things or point me in the right
direction
that would be greatly appreicated. Maybe even a book recommendations
would be
greatly appreciated.

--Zac


  #6  
Old March 25th 08, 07:51 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,610
Default Retrieving information

It doesn't work because jobName is a string variable, not an object. See http://www.outlookcode.com/article.aspx?ID=38 for sample code.

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


"Donteathecheese" wrote in message ...
I have tried this and it still didnt seem to work. Not quite sure why

Sub item_CustomPropertyChange(ByVal jobName)
With Me
jobNumber.Text = jobName.Text
End With
End Sub


" wrote:

No, that event fires for all custom properties. The name of the property
that caused the event is passed in the Name argument.

Eric

"Donteathecheese" wrote in
message ...
I thought that in the Sub Item_CustomPropertyChange syntax you replace Item
with the control you wanted to reference. In my example I wanted the
subject
to change when one of the controls to change. Maybe I am a little unclear
on
this. I have tried to look up example codes and or forums but I cant seem
to
actually get anything that works to look at for examples. Any thoughts
would
be great. I think that I might try and get one of the books from the
website
you recommended. Just wanted to add thanks for the quick reply.

"Eric Legault [MVP - Outlook]" wrote:

The only way to grab the info from a selected Contact is to grab the
ActiveExplorer.Selection object, ensuring that only one item is selected
and
that it is a Contact item. However, the process wouldn't be perfect as
the
user would need to click a button on your form to tell your code that
they
have effectively chosen the Contact already. You could get fancy with
the
Explorer.SelectionChange event, but that could be tricky.

Your procedure stub is incorrect - it should be Sub
Item_CustomPropertyChange.

To send a reply, just create a new mail item using
Application.CreateItem(olMailItem), set the properties of the returned
object
and call .Send.

For more info on Outlook programming and a great book, see
http://www.outlookcode.com.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Donteathecheese" wrote:

I have been assigned to create a form for the company I work for and I
have
ran into a few problems with some of the things I want to do. The form
I am
creating is a request form, and shippment form.

I wanted the person that was sending the form to be able to go into
their
contacts and select a person. After the person has been selected I
wanted the
street address, city, state and zip to come into field within the form.

I also wanted the subject box to be autofilled in as fields are
inputed.
here is some of my code.
Sub jobName_CustomPropertyChange(ByVal Text)
With Me
Set .jobNumber.text = .jobName.Text
End With
End Sub

This didnt seem to work and I was not sure why.

I also wanted to be able to press a button and send a reply back saying
that
the shipment has been taken care of and I was completely lost on this.

If anyone could help me with these things or point me in the right
direction
that would be greatly appreicated. Maybe even a book recommendations
would be
greatly appreciated.

--Zac


 




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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieving sent items Maurice Outlook and VBA 5 October 9th 07 08:19 PM
help with retrieving info gena Outlook Express 6 June 22nd 07 03:05 PM
How could I retrieve free/busy information if the only information I have is the Email address? Wassim Dagash Add-ins for Outlook 1 January 18th 07 03:19 PM
retrieving messages Janet Lowe Outlook Express 1 October 29th 06 05:25 PM
Retrieving information from incomming mail items. Jan G. Thorstensen Outlook and VBA 1 September 18th 06 05:45 AM


All times are GMT +1. The time now is 12:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Home Loan - Remortgage - Cheap Loan - Facebook Proxy - Credit Cards