Solved

Outlook plug-in in VB6 question - Customizing the property pages.

Posted on 2003-11-05
22
399 Views
Last Modified: 2011-09-20
All,

I found this place to be very informative on Visual Basic related topics. Thanks to all for the valuable expert knowledge sharing.

I have the following question that I would like to get some advise/tips from you guys.

I am writing outlook plug-in for our internal use.  This outlook is developed in VB6 as a dll.  Outlook plug-in will have a new toolbar, new button and a new menu item with some sub-menu items. And also, it will have a new property page added in Tools/Options menu.  

I am having problems resizing the property page that has been added as a "user control".

Another idea to overcome to this issue I had in mind is to have tab controls on the property page.
so that I can distribute the gui controls onto different tab controlled child dialogs.

I am unsuccessfull in achieving either of the above options.

Would someone please shed some ideas on how to implement this.

Thanks for your help.
st
0
Comment
Question by:satchit_talla
  • 11
  • 8
22 Comments
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
When you added the control to your project, it was compiled. Whatever size the form is in the compiled version is the size the form will be.

If you want to resize it, I suggest that you get it done before it is compiled and added to the com add-in.

I just did this, and may be putting the final project up on my website. If you have any more questions, I'll see if I can answer them. There are books you can get on creating com add-ins for outlook.

Enjoy.
0
 

Author Comment

by:satchit_talla
Comment Utility
I am under the impression that if you add a property page to outlook application under tools/options the the dialog size can't be modified. I tried to modify it, but it didn't work. Would you please be more specific/detailed in your suggestion.

Thanks
st
0
 

Author Comment

by:satchit_talla
Comment Utility
Please do send a link to your website that you are going to put the project to. I really appreciate your help.

thanks
st
0
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
I didn't mean that there may be a way to make the whole dialog box / tool window larger... just that you have to size the control in design before it gets added to the options/tool toolwindow.

What you create to make the property page is a control. If you would like to make that page a different size, then you need to do that before you compile the control.

If you need more room, then you could open another window from that... but, I would recommend that you try to be creative and keep your options limited to that space which is provided. It just makes it simpler for the user (and the programmer too).

I have one more thing to do with my project, then I will put it up on the website.
0
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
0
 

Author Comment

by:satchit_talla
Comment Utility
If I can't resize the property page, would it be possible to add tab controlled dialog boxes with main dialog so that I can distribute the controls to different child dialogs but with in the same parent dialog.

Thanks
st
0
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
Sure, you could just put a tab control on your property page.
0
 

Author Comment

by:satchit_talla
Comment Utility
Would you mind sending me a sample code to do the tab control in a property page. And also, if you are done with your sample project would you send me the link?

thanks
st
0
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
I never put a tab control on the page I created. But, that is a standard VB 6 programming technique, so I know you will get better information from a book or the help file for that control.

I'll let you know when I get the rest done.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
Hi, I have been struggling to get a final component working. Everything worked fine in an environment where VB was installed, but wouldn't work on the customers machine.

Finally, I found out how to implement the IDTExtensibility module which is required for add-ins. The sample I started from fired all the correct sequences, but didn't use IDTExt... so I just moved the code from them into "onConnect" for those modules and seems to be working now. I have my field tester checking it for me and should be ready to go later today.

If you would like to download a sample, you can go to my website and get the sample version from there. Go to http://www.taskware.ca and then click on products from the menu, and then select the link for the "Outlook Attachment Printer" towards the bottom of the page. This will give you some info. on the project, what it does and how to use it.

What it will do is load an add-in that provides "auto-print" functionality to your inbox. This can be controlled through your normal "tools -> options" interface, look for a new tab called "Autoprint Settings". You can disable the add-in without removing it by the "add-ins" options dialog in outlook. This has been tested here on OL2000 and OL2002 (xp), OL2000 was running on my Terminal Server (Windows 2003 Enterprise Server), here in my home office. My client has OL2K running on Term Serv as well. My field tester has a stand-alone PC running WinXP.

Let me know if it works on your machine... preferably, you would install this on a test machine without VB6 installed.
0
 

Author Comment

by:satchit_talla
Comment Utility
I downloaded to my pc where I have VB6 installed. It doesn't work on this machine. It installed fine.  I see the new tab created in tools->options, but when I click on the tab, it gives me an error saying  "Unable to display "Autoprint Settings" page. This page will remain visible, but is not available"

I have seen this kind of message before when I was doing my plug-in development if the property page is not setup correctly.  

Would you be able to share your code for the add-in you have developed?. If not, that is fine.


So let me know if you need any help on this. I might be able to help you out.

By the way, I did figure out to add tab controlled dialog to my property page and stuff. I think I am all set with what I needed.
0
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
I would share my code, but if you're already done then there's no point.

If you're done and it's working, perhaps you could post your solution.

That error you are seeing is what I was trying to fix... do you have a property page working in your project? Any tips?

Thanks

0
 

Author Comment

by:satchit_talla
Comment Utility
Yes, my property page is working fine.  I would like to know how you added your property page and also did you set procedure attributes for the property you have created.

Give me some details so that I can help you with the error you are getting.

0
 
LVL 1

Accepted Solution

by:
InTheWind earned 130 total points
Comment Utility
My prop page works on the computer it is compiled on and others which are running VB6, other computers will show the tab and then have an error message that "the page cannot be displayed, but will remain available".

I added my property page as an OCX control which is compiled in a separate program, per the book I was basing this on.

When adding the property page control into the new project, which is the add-in for Outlook, you get a control which is displayed on your "tools -> options" menu. To add this property page I used

Private Sub objOutlook_OptionsPagesAdd(ByVal Pages As Outlook.PropertyPages)
    Pages.Add "PPE.SettingsPage", "Autoprint Settings"
   
End Sub

PPE is the name of the project, settingspage is the name of the form (control) and "Autoprint Settings" is the name of the project which contains the add-in and the property page control.

What "procedure attributes" did you use?

Thanks
0
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
I created a work around last week and went on with other things until today... and I found out the problem. Simple really.

I was thinking about the issue and what I realized was that when the setup program was created it did not include the OCX from the property page into the end project for the rest of the code.

Once the control was compiled it had the OCX registered, but it wasn't working with an installation only! DOH!

Thanks again for your help.
0
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
we tried to help... too bad he's ignoring it
0
 

Author Comment

by:satchit_talla
Comment Utility
I agree you tried to help. If you want points, I will make sure you get points. The point is If I got the answer to my question. The answer is no. So, if you need to points so badly, I don't have a problem with that.

0
 
LVL 1

Expert Comment

by:InTheWind
Comment Utility
I don't care if you want your points back, that's fine... we never did anything with this and they just want you to close it.

I'd keep in mind, that there isn't much point in asking for comments if they are just going to be ignored.
0
 

Author Comment

by:satchit_talla
Comment Utility
I think I understand your comments.  I think its being silly over this. All I wanted was to close it and since no one has responded to my question.  I don't think I am obligated to accept an answer just because they tried to answer it.  

Administrator,

Please look at the thread for my original question and the responses that follow it. Please do take whatever action you think appropriate to close my question.

Thanks
st
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now