Quantcast
Viewing all articles
Browse latest Browse all 704

Help: Rainmeter Skins • Re: Use powershell to create a word docx and open it

The objDoc.Content.Text = "Hello, this is a new Word document." part of the code makes me think maybe you want to start this with a template, in which case, it is much easier to create a Word template file (by saving the file as .dotx) and just opening that file like you would any other document (and in Rainmeter ["C:\path\to\my\awesome_template.dotx"]). When you do open that file, Word dosen't open the template, it opens a new document with the stuff from the template, which is much much easier (and logical and less ridiculous) than using Rainmeter to do it.

Anyways, I think you can do something much easier than using Powershell

Code:

[CrDoc]Measure=PluginPlugin=RunCommandParameter=echo 2>"New Document.docx"StartInFolder=#CURRENTPATH#
All you need to do is call [!CommandMeasure CrDoc "Run"] to create the file. This will create an empty file in the place specified by StartInFolder, you can also use FinishAction=["<that path>\New Document.docx"] to open it after.

Statistics: Posted by Jeff — Yesterday, 5:31 pm



Viewing all articles
Browse latest Browse all 704

Trending Articles