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!!!
 
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).
 
Back
Top