L
Laphan
Hi All
My setup is VB6 app to Ms Word doc and basically it took me 5+ hours to get
my app to pre-populate the Save/SaveAs filename of a word doc so that when
the user has looked at the doc, found it to be OK and then clicked either
File/Save or File/SaveAs the filename is done for them.
I couldn't use the BuiltInProperties.... feature as it doesn't work when
called from an external VB6 app - is this still correct?
Somebody kindly enlightened me about the use of WordBasic and the following
command works fine in XP SP2 with Office 2000/XP/2003 (not tried 2007 yet):
oWord.WordBasic.SetDocumentProperty "Title", 0, strMyFileName, 1
Problem is I've just run the exact same app on a Vista machine running
Office 2003 and I get sort of 2 copies of the doc. One is the usual titled
Document1, as I'm pulling a Word template everytime, but when you close this
doc (ie don't bother saving it) you find another copy of the doc behind it,
but this one has the title of the Word template itself!!
Does anybody know if the BuiltInProperties.... bit works in Vista?
or
Does anybody know how I can stop this dual doc creation?
or
Does anybody know how I can just run the above WordBasic command if the OS
is XP?
Many thanks.
My setup is VB6 app to Ms Word doc and basically it took me 5+ hours to get
my app to pre-populate the Save/SaveAs filename of a word doc so that when
the user has looked at the doc, found it to be OK and then clicked either
File/Save or File/SaveAs the filename is done for them.
I couldn't use the BuiltInProperties.... feature as it doesn't work when
called from an external VB6 app - is this still correct?
Somebody kindly enlightened me about the use of WordBasic and the following
command works fine in XP SP2 with Office 2000/XP/2003 (not tried 2007 yet):
oWord.WordBasic.SetDocumentProperty "Title", 0, strMyFileName, 1
Problem is I've just run the exact same app on a Vista machine running
Office 2003 and I get sort of 2 copies of the doc. One is the usual titled
Document1, as I'm pulling a Word template everytime, but when you close this
doc (ie don't bother saving it) you find another copy of the doc behind it,
but this one has the title of the Word template itself!!
Does anybody know if the BuiltInProperties.... bit works in Vista?
or
Does anybody know how I can stop this dual doc creation?
or
Does anybody know how I can just run the above WordBasic command if the OS
is XP?
Many thanks.