Here's a list of command line switches I found for Word (no page or line number)
For page/line numbers you could use Buddy API and the sendkeys function.


HTH,

Stephen



*Type* *To do this*
*/a* Starts Word and prevents add-ins and global templates (including the Normal template) from being loaded automatically.


The */a* switch also locks the setting files; that is, the setting files cannot be read or modified if you use this switch.
*/l*/addinpath/ Starts Word and then loads a specific Word add-in.
*/m* Starts a new instance of Word without running any AutoExec macros.
*/m*/macroname / Starts Word and then runs a specific macro. The */m* switch also prevents Word from running any AutoExec macros.
*/n* Starts 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.
*/t*/templatename/ Starts Word with a new document based on a template other than the Normal template.
*/w* Starts 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.
(no switch) A new Word window is opened with a blank document using the existing instance of the Word program.




The following Word startup (command-line) switches are not listed in Word Help.

*Type * *To do this *
*/c* Starts a new instance of Word and then invokes NetMeeting.
*/q* Starts Word without displaying the Word splash screen. This switch is only available in Word 2000 Service Release 1 (SR-1).
*/r* Starts Word in the background, makes changes in the Windows registry, and then quits. This switch forces a re-register of Word in the Windows registry.
*/u* Has no effect and does not start Word.
*/x* Starts a new instance of Word from the operating shell (for example, to print in Word). This instance of Word responds to only one DDE request and ignores all other DDE requests and multi-instances. If you are starting a new instance of Word in the operating environment (for example, in Windows), it is recommended that you use the */w* switch, which starts a fully functioning instance.
*pathname\filename* Starts Starts Word with a specific document open.


*Note* To open multiple files at once, use pathname\filename.

Example: "C:\Program Files\Microsoft Office\Office\Winword.exe" c:\filename1.doc c:\filename2.doc
(any other switch) Starts a new instance of Word. For example, if you start Word with just the / and no switch, or with any unlisted switch combination, Word just starts a new instance of Word with a new blank document.



The following Word startup (command-line) switch is listed in Word 2000 Help but not listed in Word 2002 or Word 2003 Help.
*Type* *To do this*
*/m*file/n/ Starts Word and then opens the specified file on the Most Recently Used (MRU) list on the *File* menu.





Daniel Plaenitz wrote the following on 9/29/2004 10:55 AM:

At 11:09 29.09.2004 -0400, you wrote:

Hello LINGO-Lers,

Anyone know if it is possible to open a Microsoft Word document to a specific line, anchor, or page via LINGO? I'm concerned mostly with doing this on the Windows platform.


lingo plays a minor role here, methinks.
How would you tell Word to open and display a specific whatEver in the first place? I think if you call word with command line parameters it will interprete these as file names and try to open them one by one, if there is any way to fine-control word via the command line then its unknown to me.


The only thing that comes to mind is to create a vba-script which reads some parameters from an external file and then does what you want using all the power of that application control language. Lingo would be needed to write that external control file and to call Word to open the document.

A kludge, but it could be done.

daniel

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to