Hi,
I created a COM AddIn for Word that performs the functions
that it needs to, but I needed to add the ability for the
toolbar created by the COM AddIn to remember it's last
position and whether it was docked or not. I added the
following code to my "OnConnecti on" function but it fails
with an error, "Run-time exception thrown :
System.IO.IOExc eption - Bad file name or number."
With applicationObje ct.CommandBars( "SampleToolbar" )
.Left = CLng(GetSetting
("SampleToolbar ", "General", "ToolbarLef t", 0))
.Top = CLng(GetSetting
("SampleToolbar ", "General", "ToolbarTop ", 0))
.Position = CLng(GetSetting
("SampleToolbar ", "General", "ToolbarPos ", CStr
(msoBarTop)))
.Index = CLng(GetSetting
("SampleToolbar ", "General", "ToolbarInd ex", 0))
End With
Any help is appreciated! Thanks!
Jaime Rios
I created a COM AddIn for Word that performs the functions
that it needs to, but I needed to add the ability for the
toolbar created by the COM AddIn to remember it's last
position and whether it was docked or not. I added the
following code to my "OnConnecti on" function but it fails
with an error, "Run-time exception thrown :
System.IO.IOExc eption - Bad file name or number."
With applicationObje ct.CommandBars( "SampleToolbar" )
.Left = CLng(GetSetting
("SampleToolbar ", "General", "ToolbarLef t", 0))
.Top = CLng(GetSetting
("SampleToolbar ", "General", "ToolbarTop ", 0))
.Position = CLng(GetSetting
("SampleToolbar ", "General", "ToolbarPos ", CStr
(msoBarTop)))
.Index = CLng(GetSetting
("SampleToolbar ", "General", "ToolbarInd ex", 0))
End With
Any help is appreciated! Thanks!
Jaime Rios
Comment