help with OleCreateInstance("Word.Application") (OpenInsight 64-bit)
At 28 JUL 2022 06:30:56PM Barry Stevens wrote:
using OleCreateInstance("Word.Application")
Programmatically, I want to convert a .htm file to .docx and then back to .htm (this will let me get outlook email signatures in a format to enable me to convert any images to base64) - This works using msword app saveas.
What is the actual coding to do that.
At 28 JUL 2022 06:45PM Donald Bakke wrote:
using OleCreateInstance("Word.Application")
Programmatically, I want to convert a .htm file to .docx and then back to .htm (this will let me get outlook email signatures in a format to enable me to convert any images to base64) - This works using msword app saveas.
What is the actual coding to do that.
Are you familiar with the technique of creating a VB macro and using the commands it generates to write your OI code?
At 28 JUL 2022 07:39PM Barry Stevens wrote:
using OleCreateInstance("Word.Application")
Programmatically, I want to convert a .htm file to .docx and then back to .htm (this will let me get outlook email signatures in a format to enable me to convert any images to base64) - This works using msword app saveas.
What is the actual coding to do that.
Are you familiar with the technique of creating a VB macro and using the commands it generates to write your OI code?
Well, yes and no.
I can create the macro, but not quite interpret it.
Here I get:
ActiveDocument.SaveAs2 FileName:="PBCsig.docx", FileFormat:= _ wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles _ :=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _ :=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _ SaveAsAOCELetter:=False, CompatibilityMode:=15 ActiveDocument.SaveAs2 FileName:="PBCsig.htm", FileFormat:= _ wdFormatFilteredHTML, LockComments:=False, Password:="", AddToRecentFiles _ :=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _ :=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _ SaveAsAOCELetter:=False, CompatibilityMode:=0But, I assume wdFormatXMLDocument and wdFormatFilteredHTML are codes?
At 28 JUL 2022 07:44PM Barry Stevens wrote:
using OleCreateInstance("Word.Application")
Programmatically, I want to convert a .htm file to .docx and then back to .htm (this will let me get outlook email signatures in a format to enable me to convert any images to base64) - This works using msword app saveas.
What is the actual coding to do that.
Are you familiar with the technique of creating a VB macro and using the commands it generates to write your OI code?
Ah, just googled and found the codes.
I will attempt as I do have existing code for word merge, so, I will pick the eyes out of that, maybe!
Unless of course you have existing code :smile:
At 28 JUL 2022 07:50PM Donald Bakke wrote:
using OleCreateInstance("Word.Application")
Programmatically, I want to convert a .htm file to .docx and then back to .htm (this will let me get outlook email signatures in a format to enable me to convert any images to base64) - This works using msword app saveas.
What is the actual coding to do that.
Are you familiar with the technique of creating a VB macro and using the commands it generates to write your OI code?
Ah, just googled and found the codes.
I will attempt as I do have existing code for word merge, so, I will pick the eyes out of that, maybe!
Unless of course you have existing code :smile:
No existing code for what you are doing, but I've gotten familiar with writing my own code using this technique. I start with the Application object model documentation and work my way forward.
At 29 JUL 2022 03:05AM Barry Stevens wrote:
using OleCreateInstance("Word.Application")
Programmatically, I want to convert a .htm file to .docx and then back to .htm (this will let me get outlook email signatures in a format to enable me to convert any images to base64) - This works using msword app saveas.
What is the actual coding to do that.
Are you familiar with the technique of creating a VB macro and using the commands it generates to write your OI code?
Ah, just googled and found the codes.
I will attempt as I do have existing code for word merge, so, I will pick the eyes out of that, maybe!
Unless of course you have existing code :smile:
No existing code for what you are doing, but I've gotten familiar with writing my own code using this technique. I start with the Application object model documentation and work my way forward.
Got it Working!!!