Outlook 2007 Task

Status
Not open for further replies.
i think you want it like this - but i haven't spent a lot of time doing forms programming, so i could be wrong.

Sub CommandButton4_Click
Dim Str,Str1,
Dim myItem
myItem.GetInspector.ModifiedFormPages("P.2").Contr ols("TextBox20").Value = ""
myItem.GetInspector.ModifiedFormPages("P.2").Contr ols("TextBox7").Value = ""
Str = Item.GetInspector.ModifiedFormPages("General").Con trols("ComboBox7").Value
Str1 = Item.GetInspector.ModifiedFormPages("General").Con trols("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").Contr ols("TextBox20").Value = Str
myItem.GetInspector.ModifiedFormPages("P.2").Contr ols("TextBox7").Value = Str1
End Sub
 
So basically at the top after the Dim area, repeat the "myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox20").Value" with the ="" and at the bottom is still shows up as = str and do the same thing for the other one...correct?
 
that error means you don't have a myitem object. oh. it's because myitem is set later. so much for that idea.

BTW - an early warning, i will be on vacation next week and away on business for a few days the week after.
 
This is the code i found re refreshing non standard fields. So if this is correct, what do I adjust re the names etc of the fields i am using re changing the value and the text field to upgrade?

Sub Item_CustomPropertyChange(ByVal myPropName)
Select Case myPropName
Case "RespondBy"
Set myPage = myItem.GetInspector.ModifiedFormPages
Set myCtrl = myPage("P.2").Controls("DateToRespond")
If myItem.UserProperties("RespondBy").Value Then
myCtrl.Enabled = True
myCtrl.Backcolor = 1
Else
myCtrl.Enabled = False
myCtrl.Backcolor = 0
End If
Case Else
End Select
End Sub
 
I have another thought that might make this easy. Since the code I use is in script of the Contact and shows which fields get words from the other fields, how can we just adjust that code and put it in the Task script and have the code/macro recognize the fields of the contact that is assigned to the Task and just update the Task fields using another CommandButton in the Task script. The code in the script of the Contact is: 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").Contr ols("TextBox20").Value = Str
myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox7").Value = Str1

myItem.Links.Add Item
End Sub
 
Now that I'm back from vacation... Did you ever figure this out?

In the macro a post above, you need to change this line:
Set myCtrl = myPage("P.2").Controls("DateToRespond")

to match your fields.

(I am assuming the macro does what you need it to do - I don't have time to test it right now. Still trying to clear out a weeks worth of email. :( )
 
So I change all words of each textbox and combobox line from to the name of the field, not the display name...is that correct ...not sure what I change and all the places to change it Sub CommandButton4_Click
Dim Str,Str1,
Dim myItem
myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox20").Value = ""
myItem.GetInspector.ModifiedFormPages("P.2").Controls("TextBox7").Value = ""
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
 
To the Smart Women on Vacation!! There is story to it, but through someone in Houston, Texas, we came up with the script code that I add to the Contact form, that refreshes the Textboxes in the Task assigned to the Contact from the comoboxes and text boxes it originally got per the earlier code I showed you, and another script in the contact form that creates a calendar event to the form of the calendar I want to use, and automatically puts the name of the contact in the Subject line and the link to the Contact in the bottom of the Calendar event that shows the field: Contacts. Since they are a lot of words I can't post them to you, but will e-mail them to you as a response from from an e-mail I got from you, so if you ever need to know how this weeks, you got what I got! Thanks again for all your time!! :)
 
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