LOCAL oWord, cStartupPath
oWord = CREATEOBJECT("Word.Application")
cStartupPath = oWord.Options.DefaultFilePath(10) && 10 is wdStartupPath
? "Word Startup Folder:", cStartupPath
oWord.Quit
driessen wrote:I need to know the startup-folder of Word?
And if someone knows how, also the startup-folder of Excel or Outlook.
******************************************************************************
LOCAL cStartupPath := ""
PRIVATE cWord
WordOle()
cStartupPath := cWord:Options:DefaultFilePath(8) // 8 is wdStartupPath
* CStartupPath contains the startup folder of Word.
* Standard it is : %USERPROFILE%\AppData\Roaming\Microsoft\Word\STARTUP
* but it might be changed for external reasons.
******************************************************************************
PROCEDURE WordOle
* This procedure builds the OLE-connection with Word
IF (cWord := WinWordObj()) = NIL
MsgAlert("Microsoft Word wasn't installed on this computer","Alert")
ENDIF
RETURN
******************************************************************************
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 73 guests