|
-
Sep 22nd, 2004, 02:20 PM
#1
Thread Starter
Lively Member
Messing with Word html output
Hi, here's my silly problem:
I'm saving a report created with asp.net as a pure HTML file. Since we have to distribute this file, they told me to convert it to a Word Document.
I just renamed it to .doc and voilà, it opens fine with MSWord.
The thing is that Word it's opening my html file with the Web layout but I want it to show the PAGE layout.
Is there a special Word html tag that allows me to set the layout with which the file has to be opened?
Thanks, bye
- mo! I said MOOOOOOO!!
- ...yep, that's a cow, alright.
-
Sep 22nd, 2004, 02:59 PM
#2
I'm sure there is a tag or something in the document telling
word how to view the document, but would be hard to figureout.
I searched the registry and there is nothing stored there for the
view, but I did find that there is a hidden file that I cant get to
that looks like it may help - C:/904CB117/WebView_files/filelist.xml.
I'm sure the numbered folder is not the same each time or per
system. It may be easier to use some code like below to change
the view programmatically.
VB Code:
If ActiveWindow.View.SplitSpecial = wdPaneNone Then
ActiveWindow.ActivePane.View.Type = wdPrintView
Else
ActiveWindow.View.Type = wdPrintView
End If
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|