xml into outlook custom form

D

Daniel Vakil

hi, i have an outlook (XP) custom form that open automaticly the xml attach
file into its htmlbody. the htmlbody then show the xml content with its xsl
formatting. i need to print this xml/xsl files from the outlook form with
the xsl file formating with a commandbutton.
any clue, code ?
thanks
 
S

Sue Mosher [MVP-Outlook]

If the HTML message body is already correctly displaying the content, then the MailItem.Printout method should do what you need.
 
D

Daniel Vakil

hi sue, i used already this method and i tried it again today ( just in case
). it prints as outlook does from its menu meaning only headers and an icon
with the attach file name. not the content of the xml file.( and of course
not the htmlbody ).
i think the code needed has to replace "right click upon the htmlbody, print"
any clue, code please
thanks
 
S

Sue Mosher [MVP-Outlook]

So you're saying that Outlook itself does not correctly print what you see on the screen when you print manually?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
D

Daniel Vakil

if i use the outlook menu it prints, as .printout, only the original outlook
elements.
the xml attached file is printed as an icon on the page.
when loading, my custom form use a code to open the attached file into a
webbrowser outlook element. the only way i found ( so far ) is to "right
click the form body and click print". i am looking for a code to do this by
clicking a button "PRINT" on the form.
thanks again
 
S

Sue Mosher [MVP-Outlook]

Ah, that explains it. It sounds like you're not working with HTMLBody at all, as your original post implied, but with a browser control. It's normal for a control like that not to print. I wonder if you could take the rendered HTML content from the browser control and set the item's HTMLBody to that content? Or are you already using the message body for other information?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
D

Daniel Vakil

another thing : i found a "Xprint".ocx that can print the custom outlook form
as is (?)
this ocx display a right print preview including the web image but do not
print this web image....
 
S

Sue Mosher [MVP-Outlook]

XPrint works only with Outlook 2000 and even then not very well.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top