![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hello everyone,
I have an excel sheet ("Test") which in range ("D3") I would like to add the field ("txtName") from a custom outlook calendar form ("Page2"). I realize I'm missing a step. Can someone lend me some assistance? Thanks... Sub cmdGetExcel_Click() dim myIns,strName strName="C:\Documents and Settings\Jackie\My Documents\OutlookTest.xls" set myIns=item.getinspector set myPage=myIns.modifiedformpages("Page2") set txtName=myPage.Controls("txtName") set appExcel=createobject("Excel.Application") appExcel.workbooks.open (strName) appExcel.application.visible=true set wkb=appExcel.activeworkbook set wks=wkb.Worksheets("Sheet1") wks.activate set rng=wks.Range("D3") rng.value=item.userproperties("txtName") Set appExcel = Nothing End Sub |
#2
|
|||
|
|||
![]()
txtName sounds like the name of a control, not the name of a field. Since you're treating it as both below, it's impossible to know which is correct. The syntax for both is covered at http://www.outlookcode.com/d/propsyntax.htm
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Jade" wrote in message ups.com... Hello everyone, I have an excel sheet ("Test") which in range ("D3") I would like to add the field ("txtName") from a custom outlook calendar form ("Page2"). I realize I'm missing a step. Can someone lend me some assistance? Thanks... Sub cmdGetExcel_Click() dim myIns,strName strName="C:\Documents and Settings\Jackie\My Documents\OutlookTest.xls" set myIns=item.getinspector set myPage=myIns.modifiedformpages("Page2") set txtName=myPage.Controls("txtName") set appExcel=createobject("Excel.Application") appExcel.workbooks.open (strName) appExcel.application.visible=true set wkb=appExcel.activeworkbook set wks=wkb.Worksheets("Sheet1") wks.activate set rng=wks.Range("D3") rng.value=item.userproperties("txtName") Set appExcel = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem when reading closing Outlook form that uses Excel sheet | [email protected] | Outlook - Using Forms | 0 | November 9th 06 03:34 PM |
Linking a custom form field to an Excel or SharePoint List | DougD | Outlook - Using Contacts | 7 | October 27th 06 07:42 PM |
How do I Autopopulate an Outlook form from an Excel Sheet? | AttyBhai | Outlook - Using Forms | 1 | September 19th 06 01:18 PM |
Populate Company field from Contact field in custom task form | Sue Mosher [MVP-Outlook] | Outlook - Using Forms | 0 | January 20th 06 07:37 PM |
Can custom form data populate access database | jbtempe | Outlook - Using Forms | 1 | January 20th 06 03:02 PM |