06. august 2002 - 09:16Der er
5 kommentarer og 1 løsning
Åben dokument skrivebeskyttet fra kommendoprompt
Jeg har brug for at åbne et dokument skrivebeskyttet fra kommandopromptet. Fimdes der ikke en parameter der kan gøre dette. EKS: "c:\dokumenter\dokument.doc /r"
Den har jeg fundet, men det er ikke det jeg har brug for. Som i mit eksempel har jeg brug for en "slash et eller andet" for at tvinge den til at blive åbnet i skrivebeskyttet tilstand.
Synes godt om
Slettet bruger
07. august 2002 - 09:56#3
OK. Jeg fandt disse parametre i Word hjælpefilen. (Word 2002) ------------------------------------------------
/ttemplatename Start Word with a new document based on a template other than the Normal template. Example: /tMyfax.dot /a Start Word and prevent add-ins and global templates (including the Normal template) from being loaded automatically. The /a switch also locks the setting files. /laddinpath Start Word and then load a specific Word add-in. Example:/lSales.dll /m Start Word without running any AutoExec macros. /mmacroname Start Word and then run a specific macro. The /m switch also prevents Word from running any AutoExec macros. Example:/mSalelead /n Start a new instance of Word with no document open. Documents opened in each instance of Word will not appear as choices in the Window menu of other instances. /w Start a new instance of Word with a blank document. Documents opened in each instance of Word will not appear as choices in the Window menu of the other instances. Note To suppress automatic macros without using switches, hold down SHIFT while you start Word. If you start Word from the Microsoft Office Shortcut Bar, click the button for the program on the Office Shortcut Bar first, and then immediately hold down SHIFT while Word starts -------------------------------------------------------------------
Det er noget i den retning. Problemet er bare, at der ikke findes en parameter til at åbne i skriveskyttet tilstand. Det jeg skal bruge det til er, at åbne et worddpkument via en html hjælpeside...
jeg er helt enig med Blackadder. Der findes lidt flere switches end nævnt i hjælpen, men ingen af disse kan åbne i readonly. (mærkelig nok for excel kan) Men som makro i word er det ikke noget problem Documents.Open FileName:="test.doc", , ReadOnly:=True
så du kunne lave en makro i normal.dot og gøre sådan winword.exe /mStartminmakro hvor m betyder automatisk start af makro
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.