Prev: Drag & drop text from other application
Next: set up a macro that prints the document when opened
From: spunkymuffmonkey on 24 Feb 2010 11:37 Hi all, I would like to know how to retrieve a value from a date/time picker that I have inserted as an OLE Object into my document via this line: ActiveDocument.Tables(iTableCount).Rows(1).Cells(2).Range. _ InlineShapes.AddOLEControl(ClassType:="MSComCtl2.DTPicker.2") I cannot seem to fathom it out so any help would be appreciated! Many thanks for looking
From: Fumei2 via OfficeKB.com on 25 Feb 2010 15:05 Once a DTPicker is in the document it is listed as an object in the ThisDocument code module. You can access all its events there. To get the value use: MsgBox ThisDocument.DTPicker1.Value Obviously, if you have more than one, you have to use the correct number. spunkymuffmonkey wrote: >Hi all, > >I would like to know how to retrieve a value from a date/time picker that I >have inserted as an OLE Object into my document via this line: > >ActiveDocument.Tables(iTableCount).Rows(1).Cells(2).Range. _ >InlineShapes.AddOLEControl(ClassType:="MSComCtl2.DTPicker.2") > >I cannot seem to fathom it out so any help would be appreciated! > >Many thanks for looking -- Message posted via http://www.officekb.com
From: spunkymuffmonkey on 26 Feb 2010 06:35 Once again, a million thanks for the reply and I didn't notice that the object is listed in the this document picklist, instead I fed the variable using the line: dtmTable(i) = CDate(Left(CStr(oILS.OLEFormat.Object.Value), 10)) Which got what I want! "Fumei2 via OfficeKB.com" wrote: > Once a DTPicker is in the document it is listed as an object in the > ThisDocument code module. You can access all its events there. > > To get the value use: > > MsgBox ThisDocument.DTPicker1.Value > > Obviously, if you have more than one, you have to use the correct number. > > spunkymuffmonkey wrote: > >Hi all, > > > >I would like to know how to retrieve a value from a date/time picker that I > >have inserted as an OLE Object into my document via this line: > > > >ActiveDocument.Tables(iTableCount).Rows(1).Cells(2).Range. _ > >InlineShapes.AddOLEControl(ClassType:="MSComCtl2.DTPicker.2") > > > >I cannot seem to fathom it out so any help would be appreciated! > > > >Many thanks for looking > > -- > Message posted via http://www.officekb.com > > . >
|
Pages: 1 Prev: Drag & drop text from other application Next: set up a macro that prints the document when opened |