Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Setting DocClass from VBA in Word
mperceval
Hi,
I am having a bit of a problem trying to set DocClass on docs programmatically imported using VBA in Word 2002/WorkSite 7.5
I am using the following code :
Set objContextItems = New IMANEXTLib.ContextItems
Set objImportCmd = New IMANEXTLib.ImportCmd
objContextItems.Add "ParentWindow", iManVBALib.GetWindowHandle()
objContextItems.Add "DestinationObject", objDest
objContextItems.Add "IManExt.Import.Filename", "c:\martintest.doc"
objContextItems.Add "IManExt.Import.DocDescription" UserForm1.txtTitle.Text
objContextItems.Add "IManExt.Import.DeleteLocalFiles", True
objContextItems.Add "IManExt.Import.DocClass", "STAFF"
objContextItems.Add "IManExt.Import.DocType", "WORDXP"
objContextItems.Add "IManExt.OpenCmd.NoCmdUI", False
objImportCmd.Initialize objContextItems
objImportCmd.Update
objImportCmd.Execute
Set objNRTDoc = objContextItems.Item("ImportedDocument")
The doc imports fine - DocType/DeleteLocalFiles/DocDescription/NoCmdUI all function as advertised. However, I just cannot get the DocClass to update.
Having searched the forums and checked on a technote with some sample code, I just cannot see what the problem is. I'm fairly sure that I am doing something stupid at my end (and probably not with the code) but I've got a bit of snow-blindness and cannot see what is wrong.
Any suggestions would be greatly received.
Thanks in advance
Martin Perceval
Find more posts tagged with
Comments
There are no comments yet