CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2002
    Posts
    1

    How to with PrintDocument Control

    Does anyone know how to print say a Word Document or Web Page from a VB interface. In other words being able to control printing from a VB program. I'm trying to see if there is a way to pass another application (word, IE) as a parameter to the PrintDocument Control. Any help would be appreciated.

  2. #2
    Join Date
    Oct 2002
    Posts
    34
    I am trying to do something like this too. Did you find any solution to your problem? Any help or links would be appreciated.

    Moon
    Have a nice day! (^_^)

  3. #3
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    I'd use the ShellExecute API call.

  4. #4
    Join Date
    Jun 2003
    Location
    Netherlands
    Posts
    64

    Printing Worddoc

    If u would like to print a WordDocument, why not try:

    oDocument = oWord.ActiveDocument
    oDocument.PrintOut(Background:=False)

    et voilá

    D.
    The most important thing about what people say, is what they don't say

  5. #5
    Join Date
    Aug 2005
    Location
    Milwaukee, WI
    Posts
    55

    Re: How to with PrintDocument Control

    For complete documentation from MSDN on how to do as Dozo suggests, check out http://msdn.microsoft.com/library/de...ETcallsVBA.asp

    Or at msdn.microsoft.com/library navigate to :
    Office Solutions Development ->Microsoft Office 2003->Office 2003->Technical Articles
    Check out the Calling Visual Basic for Apps Code from VB .NET article. Everything you need is there...

    HTH anyone else with similar problems.

    Jeff

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

Featured