Programatically setting Word as editor, then resetting back?

  • Thread starter Thread starter StargateFanFromWork
  • Start date Start date
S

StargateFanFromWork

I'm hoping there's VB code for this. There's only one instance where I need
to use Word as the editor for O2K, that's when I have html tutorials sent to
me from my yahoo groups. I learned how easy it is to save an html email
message from without a third-party add-on, just as if I were in MSIE.

But that's the only time I need it. 99.9% of the time, I need to use O2K
instead. Was hoping there would be syntax because I'd do a button with the
Word icon on it and another one, the same, but with an X through it. Then
I'd attach the macro to assign Word as the editor and then the other code to
re-assign it back to O2K.

Was hoping this syntax actually exists, though <g>!

Thanks.
 
I'm hoping there's VB code for this. There's only one instance where I need
to use Word as the editor for O2K, that's when I have html tutorials sent to
me from my yahoo groups. I learned how easy it is to save an html email
message from without a third-party add-on, just as if I were in MSIE.

But that's the only time I need it. 99.9% of the time, I need to use O2K
instead. Was hoping there would be syntax because I'd do a button with the
Word icon on it and another one, the same, but with an X through it. Then
I'd attach the macro to assign Word as the editor and then the other code to
re-assign it back to O2K.

Was hoping this syntax actually exists, though <g>!

Thanks.

It's just to get the line of coding to do that. Is there VBA syntax
for this?
 
I'm hoping there's VB code for this. There's only one instance where
I need to use Word as the editor for O2K, that's when I have html
tutorials sent to me from my yahoo groups. I learned how easy it is
to save an html email message from without a third-party add-on, just
as if I were in MSIE.

But that's the only time I need it. 99.9% of the time, I need to use
O2K instead. Was hoping there would be syntax because I'd do a button
with the Word icon on it and another one, the same, but with an X
through it. Then I'd attach the macro to assign Word as the editor
for one and then the other code on the other button to re-assign it
back to O2K. But I need to do this programmatically rather than
manually all the time.

Thanks.
 
Inspector.EditorType is read-only, and there is no code access to the
settings in the Tools, Options dialog for setting Word as the editor. You
might just be able to set what you want in the registry but I'm not sure if
Outlook would then use your change unless it was restarted.

How are these HTML tutorials sent to you, as HTML email messages or as
attachments? If as a message you can use SaveAs with a Type := olHTML and if
as an attachment you could save the attachment to the file system. Once
that's done you could automate IE to load the saved file and then do
whatever you want with it.
 
Ken Slovak - said:
Inspector.EditorType is read-only, and there is no code access to the
settings in the Tools, Options dialog for setting Word as the editor. You
might just be able to set what you want in the registry but I'm not sure if
Outlook would then use your change unless it was restarted.
Rats.

How are these HTML tutorials sent to you, as HTML email messages or as
attachments? If as a message you can use SaveAs with a Type := olHTML and if
as an attachment you could save the attachment to the file system. Once
that's done you could automate IE to load the saved file and then do
whatever you want with it.

Unfortunately, it's text with embedded graphics, so nothing as easy as
saving to HTML format. Obviously, I tried saving to HTML but the graphics
are always stripped. With the first few, I just hardcoded the changes and
retrieved the embedded graphics via the Outlook macro used for saving these.
But all this is too much work on top of everything else one has to do.

I'll figure something out. I lately have been using AutoIt so, if worse
comes to worst, I'll record mouse clicks to set Word as the editor, and to
untick it. <sigh>.

Thanks; I really appreciate the help. :oD
 
StargateFanFromWork said:
[snip]

I'll figure something out. I lately have been using AutoIt so, if worse
comes to worst, I'll record mouse clicks to set Word as the editor, and to
untick it. <sigh>.

Eureka! I got it. Since this is for my home installation and not for here
at work, I'm saved. I'll do up the AI scripts, compile to EXE and assign
macros on O2K to them both. That should work just fine.

Thanks. I needed for this to percolate a bit, I guess, after you told me
"no can do".

Cheers!
 
Have you looked at the .HTMLBody property of those email items? It might
just have exactly what you need and you can get that into a text string and
then write the string to the file system as an .HTM file using something
like Windows Scripting. Reading .HTMLBody in Outlook 2003 or 2002 SP3 will
fire the security prompts but that's how I'd probably try things as my first
approach.




StargateFanFromWork said:
StargateFanFromWork said:
[snip]

I'll figure something out. I lately have been using AutoIt so, if worse
comes to worst, I'll record mouse clicks to set Word as the editor, and to
untick it. <sigh>.

Eureka! I got it. Since this is for my home installation and not for here
at work, I'm saved. I'll do up the AI scripts, compile to EXE and assign
macros on O2K to them both. That should work just fine.

Thanks. I needed for this to percolate a bit, I guess, after you told me
"no can do".

Cheers!
 
Ken Slovak - said:
Have you looked at the .HTMLBody property of those email items? It might

See? That's the problem with us power user newbies! <g> This is the first
I've heard of this.
What do you mean by HTMLBody property and where would I look for that, pls?
just have exactly what you need and you can get that into a text string and
then write the string to the file system as an .HTM file using something
like Windows Scripting. Reading .HTMLBody in Outlook 2003 or 2002 SP3 will
fire the security prompts but that's how I'd probably try things as my first
approach.

Sounds complicated <g>. I at least have a scriptwriter (recorder - records
movement/keyboard, etc., and outputs syntax) for AutoIt. <g> But I'm game.
Everytime I overcome an obstacle I learn something.

Thanks.
StargateFanFromWork said:
StargateFanFromWork said:
[snip]

I'll figure something out. I lately have been using AutoIt so, if worse
comes to worst, I'll record mouse clicks to set Word as the editor,
and
to

Eureka! I got it. Since this is for my home installation and not for here
at work, I'm saved. I'll do up the AI scripts, compile to EXE and assign
macros on O2K to them both. That should work just fine.

Thanks. I needed for this to percolate a bit, I guess, after you told me
"no can do".

Cheers!
 
MailItem.HTMLBody is a property that has all the HTML including the tags in
an HTML email item.
 
Back
Top