473,507 Members | 11,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem on insufficient memory in ms word when using OLE

23 New Member
I have developt an application which will show word template in the OLE object as user selected the template from a combo box. But the problem occured as below:

1. The OLE doesnt refresh the screen as i change the embedded object for the OLE.
2. After a few times of selecting different template from the combo box, ms word prompt error message "insuffiecient memory - component cannot be display properly"

My code is written as below:
Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub cmbTemplate_Click()
  3.  
  4. Const BIN = "000"
  5. Dim TempNo As String
  6.  
  7.  
  8. TempNo = cmbTemplate.ListIndex + 1
  9.  
  10. Set objAppWord = Nothing
  11.  
  12. OLE1.Close
  13. OLE1.Delete
  14. OLE1.Refresh
  15. OLE1.CreateEmbed App.Path & "\template\T" & TempNo & ".doc"
  16. OLE1.SizeMode = vbOLESizeStretch
  17. OLE1.Verb = vbOLEShow
  18. OLE1.DoVerb (vbOLEShow)
  19. OLE1.Refresh
  20.  
  21. End Sub
  22.  
But this doesn't seem like closing the ms word document effectively...
Is there anybody know the solution, please give me a hand, thank you.
Oct 20 '06 #1
0 1360

Sign in to post your reply or Sign up for a free account.

Similar topics

57
4233
by: Xarky | last post by:
Hi, I am writing a linked list in the following way. struct list { struct list *next; char *mybuff; };
78
4879
by: Josiah Manson | last post by:
I found that I was repeating the same couple of lines over and over in a function and decided to split those lines into a nested function after copying one too many minor changes all over. The only...
11
3026
by: toton | last post by:
Hi, I have little confusion about static memory allocation & dynamic allocation for a cluss member. I have class like class Bar{ public: explicit Bar(){ cout<<"bar default"<<endl; }
9
2483
by: weidongtom | last post by:
Hi, I've written the code that follows, and I use the function add_word(), it seems to work fine *before* increase_arrays() is called that uses realloc() to allocate more memory to words. But...
29
7850
by: marvinla | last post by:
Hello! I'm a beginner in C, and I'm having trouble with a pointer-to-pointer reallocation. This piece of code works well, but Valkyrie warns some parts (pointed below), and is breaking my real...
13
8001
radcaesar
by: radcaesar | last post by:
We are Running a .sql script which was created by tablediff.exe using SQLCMD The script execution fails with the ' 701: There is insufficient system memory to run this query. ' Exception. The...
2
1368
by: Silvine | last post by:
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct {int key; int digit; int string;}person; //int pass(man a); int main() {
25
2328
by: biplab | last post by:
Hi all, I am using TC 3.0..there if I declare a integer array with dimension 162*219...an error msg saying that too long array is shown....what should I do to recover from this problem???
13
2431
by: inhaler | last post by:
Hi, I have the following code that I run and compile successfully on Visual Studio 2008 using C, but the problem is when the program tries to run the first free call it just hangs there and does...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7030
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.