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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saveas default directory - COWSNewDocument

Status
Not open for further replies.

vxjca

Programmer
Feb 12, 2002
3
NL
I am working on a project using SharePoint portal for the document storage.
We are tring to force Word-XP to set the default direcory for the "SaveAs" dialog to a sharepoint folder. We can do this by changing the Options.DefaultFilePath.

However this takes too long.

We have also found the object COWSNewDocument in owssupp.dll. The CreateNewDocument function
creates a new Word session using a template and a default destination directory. If we do a saveas
in this we go directly to the destination directory.

How is this being done in Word?

- None of the DefaultFilePath's have been changed?
- I can not find any other values that have been changed either.


To see this create a VB project with a reference to "C:\Program Files\Microsoft Office\Office10\OWSSUPP.DLL"

Add a command button, cmdStartWord, below is my code.

Does anyone know how this is being done within Word?
Code:
Private Sub cmdStartWord_Click()

Dim officedoc As COWSNewDocument

Set officedoc = New COWSNewDocument

res = officedoc.CreateNewDocument
("[URL unfurl="true"]http://carliervm01/documents/ABC-2002-190-DM/temp.dot",[/URL]
   "[URL unfurl="true"]http://carliervm01/documents/ABC-2002-206-DM/john.doc")[/URL]

End Sub
[\code]

John.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top