Printing Members Of An Outlook Contact Group

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Printing Members Of An Outlook Contact Group

Post by hlewton »

I printed the members of an Outlook contact group. I did it by right clicking on the group and telling it to do a Quick Print. It printed but put many of the email addresses on the wrong line, the right column did not line up with the left column eg.
Brown, John (johnbrown@google,com)
johnbrown@google.com

So there are 2 columns that print. Some contacts left column and the right column print on the same line as it should. Some print the right column above the left column, some print the right column below the left column. Of course, this has to mean that there are blank lines between some of the printed information in the left column. When viewing this contact group in Outlook it looks perfect, as it should. Is there a way to force this list of contacts to print out as it should with both the left and right columns being on the same line?
Regards,
hlewton

User avatar
StuartR
Administrator
Posts: 12577
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Printing Members Of An Outlook Contact Group

Post by StuartR »

You could export the contacts to a CSV file, which would let you sort, filter, and print them in any way you want
StuartR


User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

I'm sorry I have to start over with what I was trying to post.
Last edited by hlewton on 17 Sep 2021, 11:13, edited 1 time in total.
Regards,
hlewton

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

StuartR wrote:
17 Sep 2021, 07:51
You could export the contacts to a CSV file, which would let you sort, filter, and print them in any way you want
I'm not sure that is an option. These contacts are all within an Outlook Contact Group. This contact group does not include all the contacts in my Outlook contact list. I believe that once I create this contact group it is then considered a single contact as far as Outlook is concerned if I were to export my contacts to a CSV file. The little I know about it is I have to right click on that contact group and then I am offered choices of what I can do. One choice was "quick print," which cause me to start this thread. Please see the attachment because exporting these contacts that are within this contact group does not appear to be an option.

Thanks for the suggestion. If you know of a way I can make only those listed inside this contact group into a CSV file please tell me how. Once I get a list from another person I will have to add many more to this contact group's list. I am trying to avoid duplicates by having a hard copy I can work from. By the way, I'm sure you already know this, the contacts within this contact group are listed alphabetically, which I need them to be. That is why I would like to somehow be able to print out what I can see when opening that group contact.
Regards,
hlewton

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

Here is the attachment mentioned above
Group Contact.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
hlewton

User avatar
Leif
Administrator
Posts: 7193
Joined: 15 Jan 2010, 22:52
Location: Middle of England

Re: Printing Members Of An Outlook Contact Group

Post by Leif »

hlewton wrote:
16 Sep 2021, 23:58
So there are 2 columns that print. Some contacts left column and the right column print on the same line as it should.
Would it be resolved by setting your printer to print in landscape?

Otherwise, could you use this: How to Print a Contact Group in Only One Page in Your Outlook - Data Recovery Blog?
Leif

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

Leif wrote:
17 Sep 2021, 12:33
hlewton wrote:
16 Sep 2021, 23:58
So there are 2 columns that print. Some contacts left column and the right column print on the same line as it should.
Would it be resolved by setting your printer to print in landscape?

Otherwise, could you use this: How to Print a Contact Group in Only One Page in Your Outlook - Data Recovery Blog?
Well I tried it. The only option I have when trying to print those contacts is "quick print" which does not allow me to change the orientation of the print out. So I went into the printer's properties and preferences and set the orientation to landscape. I printer a test page to make sure that worked and it did print the test page in the landscape view. However, the quick print option to print the contacts over rode that setting and printed it in the portrait view.

I'll look into the link you provided. Thanks for the help.

I just checked out that link and because I'm not that familiar with creating new modules I don't want to mess up my Outlook.
Last edited by hlewton on 17 Sep 2021, 14:14, edited 1 time in total.
Regards,
hlewton

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

Because this happened in this thread and because it took me 3 posts where it should only have taken me 1, I need to ask this. Once I post a reply with an attachment in it, how do I delete that attachment if I notice it in time to edit the post? I obviously don't know the correct procedure because I couldn't make it happen without removing all the post's text and attachment. Then it made me post something or I couldn't use the "submit" button.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Printing Members Of An Outlook Contact Group

Post by HansV »

When you edit a post, there is a pane with 2 tabs below the text area:

'.png

Activate the Attachments tab. Then click the 'Delete file' button.

S0764.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

Thank you.

Also I did go back to an old thread that I started and found out how to use the VBA editor that you helped me with. So I am going to try using that link that Leif gave me to print out that contact group's contacts. I don't understand the code but if it only is to get the contact group's name and its contacts on the same page not sure that will help. But I'll report back.
Last edited by hlewton on 17 Sep 2021, 17:02, edited 1 time in total.
Regards,
hlewton

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

I may need a little guidance. I copied the code, opened Outlook, used Alt + F11 to open the VBA editor. The instructions I was trying to follow were for a Word document and the next step in them was to "Click on the Normal in the project Explorer pane, then to select Insert > Module. As can be seen in the attachment, there was no "Normal" to select. From the ribbon, I selected Insert > Module, copied the code into the window that opened, did an Alt + F4 to close the window. I then printed the contents on the contact group and it printed exactly the same as before with the left and right hand columns not aligning as they should. Also it did not put the name of the group contact on the same page as the list of contacts, as the module was supposed to do. Since there was no "Normal" to choose from, did I do something wrong?
VBA.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Printing Members Of An Outlook Contact Group

Post by HansV »

What is the code you tried? The article in Leif's link doesn't mention Normal.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

HansV wrote:
17 Sep 2021, 17:57
What is the code you tried? The article in Leif's link doesn't mention Normal.
No it doesn't but it also didn't tell me how to get out of the editor so I used instructions you gave me some time ago on inserting a module into Word. I tried to follow what that link said by inserting a module but wasn't sure it was complete. The code I used is:

Code: Select all

Sub PrintAContactGroupOnOnePage()
    Dim objContactGroup As Outlook.DistListItem
    Dim i As Long
    Dim objMember As Outlook.recipient
    Dim strGroupInfo As String
    Dim objWordApp As Word.Application
    Dim objTempDocument As Word.Document
 
    'Get the source contact group
    Select Case Application.ActiveWindow.Class
           Case olExplorer
                Set objContactGroup = Application.ActiveExplorer.Selection(1)
           Case olInspector
                Set objContactGroup = Application.ActiveInspector.CurrentItem
    End Select
 
    For i = 1 To objContactGroup.MemberCount
        Set objMember = objContactGroup.GetMember(i)
        strGroupInfo = strGroupInfo & objMember.Name & ": " & objMember.Address & vbCr
    Next
 
    'Gather all essential info about the contact group
    strGroupInfo = "Contact Group Name: " & objContactGroup.DLName & vbCr _
      & "====================================================" & vbCr & vbCr & _
      "Members:" & vbCr & "-------------------------------------------------" _
      & vbCr & strGroupInfo
 
    'create a temp word document
    Set objWordApp = CreateObject("Word.Application")
    Set objTempDocument = objWordApp.Documents.Add
    objWordApp.Visible = True
    objTempDocument.Activate
 
    'Insert the Contact Group info into the temp word document
    With objTempDocument.Range(0, 0)
         .Text = strGroupInfo
         'Change the font to your liking
         With .Font
              .Name = "Cambria"
              .Color = wdColorBlack
              .Size = 12
        End With
    End With
 
    'Print the temp document
    objTempDocument.PrintOut
 
    'Close the temp document
    objTempDocument.Close False
    objWordApp.Quit
End Sub
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Printing Members Of An Outlook Contact Group

Post by HansV »

The code is intended for Outlook, not for Word.
In Outlook, press Alt+F11 to activate the Visual Basic Editor.
Select Insert > Module.
Copy/paste the code into the module.
Select Tools > References...
Scroll down the list of references until you see "Microsoft Word 16.0 Object Library".
Tick the check box of this reference, then click OK.
Close the Visual Basic Editor Window.

Back in Outlook, switch to Contacts, and select or open your contacts group.
Press Alt+F8 to activate the Macros dialog.
Select PrintAContactGroupOnOnePage and click Run.

When you quit Outlook, it will ask you whether you want to save the changes to the VBA project. Click Yes.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

HansV wrote:
17 Sep 2021, 18:28
The code is intended for Outlook, not for Word.
In Outlook, press Alt+F11 to activate the Visual Basic Editor.
Select Insert > Module.
Copy/paste the code into the module.
Select Tools > References...
Scroll down the list of references until you see "Microsoft Word 16.0 Object Library".
Tick the check box of this reference, then click OK.
Close the Visual Basic Editor Window.

Back in Outlook, switch to Contacts, and select or open your contacts group.
Press Alt+F8 to activate the Macros dialog.
Select PrintAContactGroupOnOnePage and click Run.

When you quit Outlook, it will ask you whether you want to save the changes to the VBA project. Click Yes.
Thank you I will try that now. I did insert the module into Outlook but after that I didn't do the rest of your steps.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Printing Members Of An Outlook Contact Group

Post by HansV »

If you already copied the macro into a module in Outlook, don't repeat that step.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

HansV wrote:
17 Sep 2021, 18:28
The code is intended for Outlook, not for Word.
In Outlook, press Alt+F11 to activate the Visual Basic Editor.
Select Insert > Module.
Copy/paste the code into the module.
Select Tools > References...
Scroll down the list of references until you see "Microsoft Word 16.0 Object Library".
Tick the check box of this reference, then click OK.
Close the Visual Basic Editor Window.

Back in Outlook, switch to Contacts, and select or open your contacts group.
Press Alt+F8 to activate the Macros dialog.
Select PrintAContactGroupOnOnePage and click Run.

When you quit Outlook, it will ask you whether you want to save the changes to the VBA project. Click Yes.
I did as you said and got the error message shown in the attachment. I forgot to ask, what should I do next?
VBA Error.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Printing Members Of An Outlook Contact Group

Post by HansV »

Did you follow these steps from a previous reply of mine?

Select Tools > References...
Scroll down the list of references until you see "Microsoft Word 16.0 Object Library".
Tick the check box of this reference, then click OK.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3788
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Printing Members Of An Outlook Contact Group

Post by hlewton »

HansV wrote:
17 Sep 2021, 19:50
Did you follow these steps from a previous reply of mine?

Select Tools > References...
Scroll down the list of references until you see "Microsoft Word 16.0 Object Library".
Tick the check box of this reference, then click OK.
Yes I did. However, it was already checked when I got there along with a couple others. Please see attachment
VBA Error1.jpg
I clicked the wrong one. Now I just found the Word one that you wanted me to click. I'll try running it now.
You do not have the required permissions to view the files attached to this post.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Printing Members Of An Outlook Contact Group

Post by HansV »

No, please read more carefully. You need to set a reference to Microsoft Word 16.0 Object Library.
Best wishes,
Hans