Hack Forums
[.NET] How to open docx file from resources - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] How to open docx file from resources (/showthread.php?tid=4058004)



How to open docx file from resources - barukoru - Feb 13, 2014

How to open docx file from resources From MS word......Plz help
Code
Dim path As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\.Adobe\doc.docx"
      File.WriteAllBytes(path, My.Resources.doc)
      Dim docPath As String = (Environ("APPDATA")) & "\doc.docx"



* - Ingenuity - Feb 13, 2014

From within your own program or in MS word? If you need to do it from within your program, does this feature need to work even if MS word isn't installed. Is there any reason you can't just use a compressed RTF and then just decompress it in memory and use a RichTextBox?


* - Dialog - Feb 13, 2014

Look into this and adjust it to your needs.
It's not ideal at all though.
http://www.dotnetperls.com/word-vbnet
http://msdn.microsoft.com/en-us/library/aa201330(office.11).aspx