Outlook 2007 Task

Status
Not open for further replies.
As usual, I so appreciate your thoughts!!!

The error message is "Run Time Error "424" Object Required.

And please explain what words I add an exactly where.

Where do I add the words debug.print?
Where do I add the words msgbox sr after he str = line. As a next line or after word Value. And if after Value do I put in something between those words.

I so appreciate your help to finish this!
 
Sub CommandButton1_Click()

Dim Str

Dim myItem

Str =Item.GetInspector.ModifiedFormPages("General").Co ntrols("ComboBox7").Value

MsgBox Str 'could use Debug.Print instead, then View > Immediate window

Set myItem =Application.CreateItemFromTemplate("C:\Users\Loui s\AppData\Roaming\Microsoft\Templates\TaskFollow-Up Template.oft")

myItem.Display

myItem.GetInspector.ModifiedFormPages("P.2").Contr ols("TextBox20").Value= Str

MsgBox Str

End Sub
 
So copy and paste this to the Module and then run the commandbotton on the contact and see what happens?
icon7.png
 
Yes, see if the correct value is passed each time.
 
Did it. Here is exactly what i wrote to the Module and have the commandbotton to it in the contact form and the same exact error happened.

Sub CommandButton1_Click()

Dim Str

Dim myItem

Str = Item.GetInspector.ModifiedFormPages("General").Controls("ComboBox7").Value

MsgBox Str 'could use Debug.Print instead, then View > Immediate window

Set myItem = Application.CreateItemFromTemplate("C:\Users\Louis\AppData\Roaming\Microsoft\Templates\TaskFollow-Up Template.oft")

myItem.Display

myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox20").Value = Str

MsgBox Str
End Sub
 
Did the message box have the expended information ?
 
Not sure what you mean by the message box. If you mean the only box that opens when there is the error, that box simply states the same:

"Run Time Error "424" Object Required.

So, any other thoughts to fix it? That would be wonderful!!
 
so it errors before it does anything? I'll have to test the code and see what object it thinks is missing.
 
Yes. It errors before it does anything and then that line is yellow in the Module. I so appreciate you figuring out how to do this as soon as possible.:)
 
Any possible update tonight??

Thank-you very much!
 
probably not. The server one of our sites uses crashed Thursday and I'm still working on getting the new server adjusted correctly.
 
Here is the Code that is working at a certain level and which is put in the View Code/Script Editor of the form of the Contact.

Sub CommandButton4_Click

Dim Str,Str1,

Dim myItem

Str = Item.GetInspector.ModifiedFormPages("General").Controls("ComboBox7").Value

Str1 = Item.GetInspector.ModifiedFormPages("General").Controls("ComboBox8").Value

Set myItem = Application.CreateItemFromTemplate ("C:\Users\Stoler Law\AppData\Roaming\Microsoft\Templates\Task Follow-Up.oft")

myItem.Display

myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox20").Value = Str

myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox7").Value = Str1

End Sub

This code is working by doing using it this way:

In the contact form, there is the new CommandButton4.

In the Str lines, each line refers to a ComboBox in the form of the Contact, and the ( ) area after "Controls" is the Display Name of the the Combobox.

The Set myItem line, refers to the the form of the Task form that I added the Textbox(s) to, and saved to my template area.

In the myItem line, the ("P.2") refers to the Page 2 of the Task form, and the the area ( ) after Controls is the Display Name of the TextBox that is to get the Value from the particular ComboBox of a Str line.

And when I created the Task P.2 area, that's where I put in the TextBox(s) and I created a new field for each one so it is stored.

So the next problem to fix, is that when I click on the CommandButton4 in a contact, it creates the Task and it puts in the TextBox(s) the values from the ComboBox(s) of the Contact I am doing it from, but it does not assign the Task to the contact and show the link of the contact at the bottom of the Task, which is what it would normally do in the Assign Task of a Contact. Is there a way to fix this??

And the second area, is after a Task is created per this process, and I later change a value in a ComboBox of the Contact that gets assigned to the Task, how can it upgrade the TextBox(s) of the Task with the current Value?

Thanks so much.
 
Here is another way to describe the situation:I have a code which is put in the View Code/Script Editor of the form of the Contact. It creates a Task and puts in the TextBoxes of the Task form, the Values from the ComboBoxes or TextBoxes from the Contact that the Task is created from. So in the form of the Contact, there is the new CommandButton4 that when I click on in the Contact, it creates the Task and the brings the Values from the ComboBoxes or TextBoxes from the Contact that the Task is created from to the TextBoxes in the Task created.

So what I need please is how to add to the code or create another code (and where to put it) that will assign the Contact to the Task, just like the "Assign Task" when I click on the CommandButton4, and then at the bottom of the Task, it shows the link to the Contact.

And the second area, is after a Task is created per this process, and I later change a value in a ComboBox of the Contact that gets assigned to the Task, how can it upgrade the TextBox(s) of the Task with the current Value?

Here is the Code that is working, how it is drafted, and it is put in the View Code/Script Editor of the form of the Contact, and the Contact form is published in the normal way.

Thanks very much.
Sub CommandButton4_Click
Dim Str,Str1,
Dim myItem
Str = Item.GetInspector.ModifiedFormPages("General").Controls("ComboBox7").Value
Str1 = Item.GetInspector.ModifiedFormPages("General").Controls("ComboBox8").Value
Set myItem = Application.CreateItemFromTemplate ("C:\Users\Stoler Law\AppData\Roaming\Microsoft\Templates\Task Follow-Up.oft")
myItem.Display

myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox20").Value = Str
myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox7").Value = Str1
End Sub
This code is working by drafting it this way:
In the contact form, there is the new CommandButton4.
In the Str lines, each line refers to a ComboBox in the form of the Contact, and the ( ) area after "Controls" is the Display Name of the the Combobox.
The Set myItem line, refers to the the form of the Task form that I added the Textboxes to, and saved to my template area.
In the myItem line, the ("P.2") refers to the Page 2 of the Task form, and the the area ( ) after Controls is the Display Name of the TextBox that is to get the Value from the particular ComboBox of a Str line.
And when I created the Task P.2 area, that's where I put in the TextBox(s) and I created a new field for each one so it is stored.
 
Still waiting for the smart woman!!!:) I need her!!
 
I put at the end of the code before the words "End Sub" the words "myItem.Links.Add Item" and published the form, and it adds the contact link to the Task!!

So the last area to know how to do per what I posted, is what code to use and where to put it, so when I update the values of the Comboboxes in the Contact that is linked to the Task, the Textboxes that received the values from the Comboboxes are updated in the Task. As you see the code, you know how the populated the value works, so how to refresh the populating.?

That would be wonderful if you can tell me how to do that right away as I have many things to update etc.
 
Any update and/or timing please? Thank you.
 
These would be the two that you need to refresh, I think - try setting the value to = ""
then set the value from the control.

myItem.GetInspector.ModifiedFormPages("P.2").Contr ols("TextBox20").Value = Str

myItem.GetInspector.ModifiedFormPages("P.2").Contr ols("TextBox7").Value = Str1
 
Thank you.

Don't understand what to do. Do I change the code and then it just automatically updates the textboxes when the comboboxs value is changed?

Please explain what to change and what it looks like as I don't understand.

Thanks much.
 
Any update how to do it please? I just don't understand what top change and where etc.....and I do need to refresh the Textboxes re the ComboBoxes Thanks much.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P Task form created in outlook 2007 Outlook VBA and Custom Forms 2
L Outlook 2007 Contact in a Task Using Outlook 15
L Outlook 2007 E-Mail From Selected Task Using Outlook 18
L Outlook 2007 New Task Folder Using Outlook 1
R Outlook 2007 task issues Using Outlook 2
C Scheduled Task Doesn't work with Outlook 2007 Outlook VBA and Custom Forms 1
J How do I access the AssignedTo property in an outlook 2007 task? Outlook VBA and Custom Forms 7
S Outlook 2007 error message using the TASK feature Using Outlook 6
D Outlook 2007 Recovering E-Mails Using Outlook 0
W Transfer Outlook 2016 autocomplete file to Outlook 2007 Using Outlook 1
C Outlook 2007 Removing then adding account restores junk email processing Using Outlook 0
S Outlook 2007 crash linked to gdiplus.dll Using Outlook 0
S Outlook 2007 - Automatic purge fail Using Outlook 0
J outlook 2007 doesn't let me choose which .pst to search Using Outlook 2
D Outlook 2007 vs. Outlook 2010 -- ToDo Bar Using Outlook 0
D Outlook 2007 on 365 Using Outlook.com accounts in Outlook 2
S Macro for other actions - Outlook 2007 Outlook VBA and Custom Forms 23
S Verwendung von Outlook 2007 Using Outlook 0
A Arthur needs help with 2007 Outlook e-mail Using Outlook.com accounts in Outlook 3
M PST import from Outlook 2007 to 2010 - Address Book contacts all in 1 group Using Outlook 4
S outlook 2007 calendar search Using Outlook 6
B Migrate Outlook 2007 to Office 365 Using Outlook 3
X I have met my waterloo trying to resolve embedded graphics problem with outlook 2007 and now 2016 Using Outlook 1
R Outlook 2007 only loads some appointments Using Outlook 0
C Move Outlook 2007 to new PC with Outlook 365 Using Outlook 3
J Outlook 2007 Hide Messages Option not Available Using Outlook 2
S Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 4
S Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 0
B Server errors Outlook 2007 Using Outlook 1
S Reboot of frozen windows7 results in changed outlook 2007 settings Using Outlook 1
S Outlook 2007 printing wrong email address at top of page Using Outlook 8
M Configure outlook 2007 to accept digital signatures Using Outlook 2
D Outlook 2007 crashes when opening an email Using Outlook 2
R New chap saying hello and needing advice on Outlook 2007 thumbnails Using Outlook 3
icacream From Outlook 2007 to 2016 ! Using Outlook 9
vodkasoda Object could not be found Error in Outlook 2007 Outlook VBA and Custom Forms 5
S Outlook 2007: Address Cards allow entering text! Why? Using Outlook 3
S View Appointment in Text Wrap in Outlook 2007 Month Calendar View Using Outlook 0
L Outlook 2007 Separate the Send/Receive functions Using Outlook 2
M Outlook 2007 Contacts Glitch: Creating a new email Using Outlook 1
C Move from Outlook 2007 Enterprise (MOE) to Outlook Pro plus 2007 Using Outlook 1
J reinstalling Outlook 2007 asking for user name & password Using Outlook 14
P outlook addin unloaded in office 2007 Using Outlook 0
B Fonts in Outlook 2007 Using Outlook 4
R Add Exchange Account to existing POP3 Outlook 2007 Profile Using Outlook 0
C out of space in file group Outlook 2007 Using Outlook 2
A Moving archived contents in Outlook 2007 back into working folders Using Outlook 0
P Outlook 2007 Email Categorization using VBA Outlook VBA and Custom Forms 1
M Unable to Configure Gmail Account in Outlook 2007 Using Outlook 1
R Outlook 2007 or 2010 - Lock Down Functionality Outlook VBA and Custom Forms 3

Similar threads

Back
Top