Re: how to code printing in excel
From: Chad DeMeyer (cjdemeye_at_bechtel.com)
Date: 06/01/04
- Next message: Gordon Garnsey: "Re: Variant data types in .Net"
- Previous message: Chad DeMeyer: "Re: Capturing Key Events in Add-In"
- In reply to: qlueless: "how to code printing in excel"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Jun 2004 14:44:25 -0700
Unfortunately, the Dialog object in Excel has no Display method. Only the
Show method is provided.
Regards,
Chad
"qlueless" <anonymous@discussions.microsoft.com> wrote in message
news:9A3C5C28-55E0-4B00-A7CF-43D759EAC675@microsoft.com...
> My com add-in is to handle customized printing in Word and Excel.
> I have no problem with Word but cannot find anything workable for Excel.
> Here is the code snippet:
>
> If app = "Microsoft Word" Then
> Set dlg = app.Dialogs(wdDialogFilePrint)
> ElseIf app = "Microsoft Excel" Then
> Set dlg = app.Dialogs(xlDialogPrint)
> End If
>
> If dlg.Display = -1 Then
> Dim doc As Object
> If app = "Microsoft Word" Then
> Set doc = mclsAccess.AppInstance.ActiveDocument
> ElseIf app = "Microsoft Excel" Then
> Set doc = mclsAccess.AppInstance.Active***
> End If
> doc.PrintOut PrintToFile:=dlg.PrintToFile
> End if
>
> When I invoke the print in Excel
> I am getting Error 438 (Object does not support this property or method)
> but I cannot find anything that works.
>
> Any help will be greatly appreciated.
- Next message: Gordon Garnsey: "Re: Variant data types in .Net"
- Previous message: Chad DeMeyer: "Re: Capturing Key Events in Add-In"
- In reply to: qlueless: "how to code printing in excel"
- Messages sorted by: [ date ] [ thread ]