Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 01 DEC 2010 05:18:08PM Barry Stevens wrote:

using ole excel.application, how do I 'Autofit' all the columns.

tia


At 01 DEC 2010 07:14PM Colin Rule wrote:

Range=OleGetProperty(oSheet,"Range","A:Z")

oEntireColumn=OleGetProperty(Range,"EntireColumn")

OlePutProperty(oEntireColumn,"Autofit",1)


At 01 DEC 2010 08:27PM Barry Stevens wrote:

COOL, Thanks Colin.

Saw those in the excel macro, but stuffed up the oi 'conversion' - still cant workout what should be methods and what should be properties.

Where is a list of methods and properties for excel.


At 01 DEC 2010 08:55PM Barry Stevens wrote:

Sorry stupid question again.

I have an 'open' 'Workbook'.

How do I get oSheet


At 01 DEC 2010 09:15PM Barry Stevens wrote:

Dont worry, worked it out…Whooo Hooo

oSheet=olegetproperty(objWorkBook,"Worksheets",1)


At 01 DEC 2010 10:30PM Colin Rule wrote:

Barry, I agree its not easy, especially for us older programmers who have not had schooling in object etc.

I generally record an Excel Macro and take it from there.

Useful links include

http://msdn.microsoft.com/en-us/library/aa221100(office.11).aspx

and reference

http://msdn.microsoft.com/en-us/library/aa272268(v=office.11).aspx

Colin


At 02 DEC 2010 03:23PM Barry Stevens wrote:

Colin, Agree

Thanks for the links.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/6d6de0e9eb45db10852577ec007a8289.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1