Results 1 to 2 of 2

Thread: Messing with Word html output

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2003
    Posts
    89

    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.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    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:
    1. If ActiveWindow.View.SplitSpecial = wdPaneNone Then
    2.     ActiveWindow.ActivePane.View.Type = wdPrintView
    3. Else
    4.     ActiveWindow.View.Type = wdPrintView
    5. 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width