Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Publish a .TXT file automatically using CE COM Objects

Status
Not open for further replies.

10crystal10

Programmer
Mar 2, 2005
7
0
0
US
Is it even possible to Publish a .TXT file? using the CE COM Interface?
I could successfully publish a .RPT file.
But get an error when trying to commit a .TXT file.

Here is the code
*******************************************************
Set pluginManager = Obj_IStore.PluginManager

'Creates a new, empty InfoObject collection.
Set col_infoobjs = Obj_IStore.NewInfoObjectCollection()


'return a TXT Plugin
Set obj_txtPlugin = pluginManager.PluginInfo("CrystalEnterprise.Txt")


Set obj_infoobj = col_infoobjs.Add(obj_txtPlugin)


Call obj_infoobj.Files.Add(File_Name)


obj_infoobj.ParentId= ERM_Folder_Id


Call Obj_IStore.Commit(col_infoobjs)
'I Get an Error here
Error #-2147024809: One or more arguments are invalid.

*******************************************************
Any idea what is happening?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top