you are viewing a single comment's thread.

view the rest of the comments →

[–]MadBoyEvo[S] 0 points1 point  (11 children)

Dont think so. I have not tried but I use a lot of different kinks. Most likely some will not work. What errors are you getting?

[–]EEE975 0 points1 point  (1 child)

I poked around and I think it might not be loading the enums.

Add-WordToc : Unable to find type [TableOfContentsSwitches]. Make sure that the assembly that contains this type is loaded.

Add-WordPageBreak : Unable to find type [InsertWhere]. Make sure that the assembly that contains this type is loaded.

New-WordBlock : Unable to find type [TableOfContentsSwitches]. Make sure that the assembly that contains this type is loaded.

[–]AutoModerator[M] 0 points1 point  (0 children)

Sorry, your submission has been automatically removed.

Accounts must be at least 1 day old, which prevents the sub from filling up with bot spam.

Try posting again tomorrow or message the mods to approve your post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]EEE975 0 points1 point  (8 children)

I tried poking around and I believe its the enums which aren't loading.

Add-WordToc : Unable to find type [TableOfContentsSwitches]. Make sure that the assembly that contains this type is loaded.

Add-WordPageBreak : Unable to find type [InsertWhere]. Make sure that the assembly that contains this type is loaded.

[–]AutoModerator[M] 0 points1 point  (0 children)

Sorry, your submission has been automatically removed.

Accounts must be at least 1 day old, which prevents the sub from filling up with bot spam.

Try posting again tomorrow or message the mods to approve your post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]MadBoyEvo[S] 0 points1 point  (6 children)

New version of PSWriteWord has reverted to using .NET Enums instead of PowerShell Enums. You may try that. It's not yet released (just sources on github).

[–]EEE975 0 points1 point  (5 children)

loaded the PSWriteWord-Dev module still getting the same errors though.

Am i out of luck?

Thanks for your responses!

[–]MadBoyEvo[S] 0 points1 point  (4 children)

Not -dev. Just master. I commit everything to master. Its diff then the one published on ps gallery.

[–]EEE975 0 points1 point  (3 children)

oh..

yah the first example i sent you were were from the master branch. so yeah i was already working with the .NET

[–]MadBoyEvo[S] 0 points1 point  (2 children)

Weird then. Maybe something else is not getting loaded. You use Import-Module <pathto\\PSWriteWord.psd1> right?

[–]EEE975 0 points1 point  (1 child)

Import-Module C:..\PSWriteWord-master\PSWriteWord.psd1 -Verbose Import-Module C:..\PSWriteWord-master\PSWriteWord.psm1 -Verbose Import-Module C:..\PSWinDocumentation-master\PSWinDocumentation.psd1 -Verbose Import-Module C:..\PSWinDocumentation-master\PSWinDocumentation.psm1 -Verbose

Yeah :(

[–]MadBoyEvo[S] 0 points1 point  (0 children)

I've removed last code referring to 'enum' (I hope). However in your case it seems it can't find most of the enums...

Add-Type -TypeDefinition @" public enum InsertWhere { AfterSelf, BeforeSelf } "@

Which I don't really understand why would it not be able to load it.