Condividi:        

stampa commenti delle celle

Vuoi potenziare i tuoi documenti Word? Non sai come si fa una macro in Excel? Devi creare una presentazione in PowerPoint?
Oppure sei passato a OpenOffice e non sei sicuro di come lavorare al meglio?

Moderatori: Anthony47, Flash30005

stampa commenti delle celle

Postdi matzap » 02/02/16 14:44

ciao, eccomi qui con un altro quesito.

ho delle celle con dei commenti che lascio visibilli.
quando selelziono l'area di stampa e tramite macro invio la stampa, i commenti non vengono stampati nellla loro posizione , ma alla fine della stampa su un altro foglio mi esce il commento con l'indicazione della cella in cui è inserito.

Come posso evitarlo?
Posso farli stampare nella loro posizione originale?

Ciao e grazie
excel 2010
matzap
Utente Senior
 
Post: 246
Iscritto il: 16/04/13 08:27

Sponsor
 

Re: stampa commenti delle celle

Postdi alfrimpa » 02/02/16 14:56

Ciao matzap

Vedi se ti può essere utile questo link

https://support.office.com/it-it/articl ... 1dc0b074a6

dove ad un certo punto c'è scritto che c'è un'opzione per decidere dove stampare i commenti.
Alfredo

Win7 + Office 2007
Avatar utente
alfrimpa
Utente Senior
 
Post: 1201
Iscritto il: 30/12/13 17:01
Località: Napoli

Re: stampa commenti delle celle

Postdi matzap » 02/02/16 17:33

ciao,
grazie è quello che cercavo. il problema è che io faccio partire la stampa da una macro nella quale ho impostato
PrintComments = xlPrintInPlace

però mi stamap sempre i commenti alla fine del foglio.

questo è il codice:
Codice: Seleziona tutto
Sub stampa2()
'
' stampa2 Macro
'

'
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .PrintTitleRows = ""
        .PrintTitleColumns = ""
    End With
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = ""
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .LeftHeader = ""
        .CenterHeader = ""
        .RightHeader = ""
        .LeftFooter = ""
        .CenterFooter = ""
        .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(0.7)
        .RightMargin = Application.InchesToPoints(0.7)
        .TopMargin = Application.InchesToPoints(0.75)
        .BottomMargin = Application.InchesToPoints(0.75)
        .HeaderMargin = Application.InchesToPoints(0.3)
        .FooterMargin = Application.InchesToPoints(0.3)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintInPlace
        .PrintQuality = 600
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlLandscape
        .Draft = False
        .PaperSize = xlPaperA4
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 1
        .PrintErrors = xlPrintErrorsDisplayed
        .OddAndEvenPagesHeaderFooter = False
        .DifferentFirstPageHeaderFooter = False
        .ScaleWithDocHeaderFooter = True
        .AlignMarginsHeaderFooter = True
        .EvenPage.LeftHeader.Text = ""
        .EvenPage.CenterHeader.Text = ""
        .EvenPage.RightHeader.Text = ""
        .EvenPage.LeftFooter.Text = ""
        .EvenPage.CenterFooter.Text = ""
        .EvenPage.RightFooter.Text = ""
        .FirstPage.LeftHeader.Text = ""
        .FirstPage.CenterHeader.Text = ""
        .FirstPage.RightHeader.Text = ""
        .FirstPage.LeftFooter.Text = ""
        .FirstPage.CenterFooter.Text = ""
        .FirstPage.RightFooter.Text = ""
    End With
    Application.PrintCommunication = True
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .PrintTitleRows = ""
        .PrintTitleColumns = ""
    End With
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = ""
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .LeftHeader = ""
        .CenterHeader = ""
        .RightHeader = ""
        .LeftFooter = ""
        .CenterFooter = ""
        .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(0.7)
        .RightMargin = Application.InchesToPoints(0.7)
        .TopMargin = Application.InchesToPoints(0.75)
        .BottomMargin = Application.InchesToPoints(0.75)
        .HeaderMargin = Application.InchesToPoints(0.3)
        .FooterMargin = Application.InchesToPoints(0.3)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintInPlace
        .PrintQuality = 600
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlLandscape
        .Draft = False
        .PaperSize = xlPaperA4
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 1
        .PrintErrors = xlPrintErrorsDisplayed
        .OddAndEvenPagesHeaderFooter = False
        .DifferentFirstPageHeaderFooter = False
        .ScaleWithDocHeaderFooter = True
        .AlignMarginsHeaderFooter = True
        .EvenPage.LeftHeader.Text = ""
        .EvenPage.CenterHeader.Text = ""
        .EvenPage.RightHeader.Text = ""
        .EvenPage.LeftFooter.Text = ""
        .EvenPage.CenterFooter.Text = ""
        .EvenPage.RightFooter.Text = ""
        .FirstPage.LeftHeader.Text = ""
        .FirstPage.CenterHeader.Text = ""
        .FirstPage.RightHeader.Text = ""
        .FirstPage.LeftFooter.Text = ""
        .FirstPage.CenterFooter.Text = ""
        .FirstPage.RightFooter.Text = ""
    End With
    Application.PrintCommunication = True
    Selection.PrintOut Copies:=1
    ActiveSheet.PageSetup.PrintArea = "$A$3:$AE$27"
    ActiveSheet.PageSetup.PrintArea = "$A$3:$AE$21"
End Sub



secondo te perchè?
P.S: il codice deriva da macro registrata.
excel 2010
matzap
Utente Senior
 
Post: 246
Iscritto il: 16/04/13 08:27

Re: stampa commenti delle celle

Postdi Anthony47 » 02/02/16 22:49

La macro contiene due blocchi uguali, quindi il primo puo' essere eliminato; probabilmente puo' essere eliminato anche un altro 90% di istruzioni (avendo la pazienza di guardare quali sono impostazioni di default e quali vere utili impostazioni).
Ma questo non risolve il problema dei commenti.

Per fargli digerire l'impostazione PrintComments = xlPrintInPlace ho dovuto disabilitare la Application.PrintCommunication = False in testa al blocco.

La proprieta' PrintCommunication e' stata introdotta da Office 2010, e la descrizione dice:
"Impostare la proprietà PrintCommunication su False per velocizzare l'esecuzione del codice che imposta la proprietà PageSetup. Impostare la proprietà PrintCommunication su True dopo avere impostato le proprietà per eseguire il commit di tutti i comandi PageSetup"
Il mio sospetto e' che non tutti i driver di stampante sono "così sofisticati"; poiche' mi pare sia solo una velocizzazione di esecuzione, io direi che possiamo tranquillamente privilegiare una "lenta e corretta" esecuzione...

Ho aggiunto anche in testa la riga per forzare la visualizzazione dei commenti, anche se e' meglio averli gia' visualizzati per valutare la loro posizione sul foglio.
Il codice completo e':
Codice: Seleziona tutto
Sub stampa3()
'
' stampa2 Macro
'

'
Application.DisplayCommentIndicator = xlCommentAndIndicator
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = ""
'''    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .LeftHeader = ""
        .CenterHeader = ""
        .RightHeader = ""
        .LeftFooter = ""
        .CenterFooter = ""
        .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(0.7)
        .RightMargin = Application.InchesToPoints(0.7)
        .TopMargin = Application.InchesToPoints(0.75)
        .BottomMargin = Application.InchesToPoints(0.75)
        .HeaderMargin = Application.InchesToPoints(0.3)
        .FooterMargin = Application.InchesToPoints(0.3)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintInPlace
        .PrintQuality = 600
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlLandscape
        .Draft = False
        .PaperSize = xlPaperA4
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 1
        .PrintErrors = xlPrintErrorsDisplayed
        .OddAndEvenPagesHeaderFooter = False
        .DifferentFirstPageHeaderFooter = False
        .ScaleWithDocHeaderFooter = True
        .AlignMarginsHeaderFooter = True
        .EvenPage.LeftHeader.Text = ""
        .EvenPage.CenterHeader.Text = ""
        .EvenPage.RightHeader.Text = ""
        .EvenPage.LeftFooter.Text = ""
        .EvenPage.CenterFooter.Text = ""
        .EvenPage.RightFooter.Text = ""
        .FirstPage.LeftHeader.Text = ""
        .FirstPage.CenterHeader.Text = ""
        .FirstPage.RightHeader.Text = ""
        .FirstPage.LeftFooter.Text = ""
        .FirstPage.CenterFooter.Text = ""
        .FirstPage.RightFooter.Text = ""
    End With
    Application.PrintCommunication = True
    Selection.PrintOut Copies:=1
'    ActiveSheet.PageSetup.PrintArea = "$A$3:$AE$27"
    ActiveSheet.PageSetup.PrintArea = "$A$3:$AE$21"
End Sub


Ciao
Avatar utente
Anthony47
Moderatore
 
Post: 19220
Iscritto il: 21/03/06 16:03
Località: Ivrea

Re: stampa commenti delle celle

Postdi matzap » 03/02/16 11:28

Ciao Anthony,
in effetti la macro era un po' ingarbugliata e avrei dovuto lavorarci su, ma avevo fretta prima di risolvere l'inconveniente dei commenti...
Ora funziona grazie.... anche delle spiegazioni
excel 2010
matzap
Utente Senior
 
Post: 246
Iscritto il: 16/04/13 08:27


Torna a Applicazioni Office Windows


Topic correlati a "stampa commenti delle celle":


Chi c’è in linea

Visitano il forum: Nessuno e 32 ospiti