Problem for "InchesToPoints" function

zorzos

New member
Joined
Aug 10, 2004
Messages
4
Programming Experience
1-3
I am writing a little vba code in order to draw a table in a word document.

When i try something like :

"
m_WordServer.ActiveDocument.Tables.Item(tableitems).Columns.Item(col).Width = InchesToPoints(2.54)

"
i get the InchesToPoints underlined, showing there is an error.
Do i need to add a specific reference in my project, or is it something else??

Thanx!!!
 

EdAlaska

Member
Joined
Aug 11, 2004
Messages
9
Programming Experience
10+
don't know if this will work or not, but, have you tried putting quotes around the 2.54?


ed.
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
VB.NET doesn't support VBA so I assume you're using codeBehind in the Word Doc?

If so, try: ThisApplication.InchesToPoints(2.54).

If instead you are doing office automation using VB.NET, the InchesToPoints method is a member of the Word._Application interface. You'll need to qualify the method: m_WordServer.InchesToPoints(2.54).
 
Top Bottom