Click here to Skip to main content
15,911,646 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Microsoft Flexgrid Pin
viji]21-Oct-06 18:34
viji]21-Oct-06 18:34 
GeneralRe: Microsoft Flexgrid Pin
nlarson1122-Oct-06 4:33
nlarson1122-Oct-06 4:33 
QuestionActivedocument error - word addin problem [modified] Pin
K edar V18-Oct-06 20:08
K edar V18-Oct-06 20:08 
AnswerRe: Activedocument error - word addin problem Pin
Edbert P19-Oct-06 19:26
Edbert P19-Oct-06 19:26 
GeneralRe: Activedocument error - word addin problem Pin
K edar V19-Oct-06 20:16
K edar V19-Oct-06 20:16 
GeneralRe: Activedocument error - word addin problem Pin
Edbert P19-Oct-06 20:26
Edbert P19-Oct-06 20:26 
GeneralRe: Activedocument error - word addin problem Pin
K edar V19-Oct-06 20:43
K edar V19-Oct-06 20:43 
GeneralRe: Activedocument error - word addin problem Pin
Edbert P19-Oct-06 21:06
Edbert P19-Oct-06 21:06 
Ok, let's see:

Kedar V wrote:
First of all i;ve created word addin.. which when removed leaves the trace behind

You should add the buttons as temporary buttons only (in your code) so they disappear when your add-in is removed/not working.

Kedar V wrote:
he problem occurs whenever i open and existing document.
Reason: As there is no ActiveDocument, the code above gives me an error

You probably called your function in the wrong event. The DocumentOpen event should have an ActiveDocument in it (which will be the document you've just opened). And obviously placing your code in WindowActivate is the wrong step.

You also only need to add your button ONCE, not multiple times as this works in all instances of the documents, so I recommend in your function to check whether the button already exist or not. If yes, then do not add/attach the event anymore.
Your application probably slowed down due to multiple event handlers being attached to the same button.


"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson

"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin

Edbert
Sydney, Australia

GeneralRe: Activedocument error - word addin problem Pin
K edar V19-Oct-06 21:23
K edar V19-Oct-06 21:23 
QuestionDecryption(plz urgent,,,_ Pin
ravimorampudi18-Oct-06 19:39
ravimorampudi18-Oct-06 19:39 
AnswerRe: Decryption(plz urgent,,,_ Pin
Dave Kreskowiak19-Oct-06 4:55
mveDave Kreskowiak19-Oct-06 4:55 
GeneralRe: Decryption(plz urgent,,,_ Pin
Colin Angus Mackay19-Oct-06 13:48
Colin Angus Mackay19-Oct-06 13:48 
GeneralRe: Decryption(plz urgent,,,_ Pin
Dave Kreskowiak19-Oct-06 18:02
mveDave Kreskowiak19-Oct-06 18:02 
AnswerRe: Decryption(plz urgent,,,_ Pin
Colin Angus Mackay19-Oct-06 13:51
Colin Angus Mackay19-Oct-06 13:51 
QuestionAccessing Controls On Other Forms Pin
johngod18-Oct-06 19:19
johngod18-Oct-06 19:19 
AnswerRe: Accessing Controls On Other Forms Pin
nlarson1119-Oct-06 5:05
nlarson1119-Oct-06 5:05 
QuestionHow to create Custom word Document Pin
chandu4codeproj18-Oct-06 18:34
chandu4codeproj18-Oct-06 18:34 
AnswerRe: How to create Custom word Document Pin
Edbert P19-Oct-06 19:30
Edbert P19-Oct-06 19:30 
GeneralRe: How to create Custom word Document Pin
chandu4codeproj20-Oct-06 17:51
chandu4codeproj20-Oct-06 17:51 
GeneralRe: How to create Custom word Document Pin
Edbert P22-Oct-06 13:02
Edbert P22-Oct-06 13:02 
QuestionInvalid Operation Exception Was Unhandled Pin
UltraCoder18-Oct-06 18:23
UltraCoder18-Oct-06 18:23 
QuestionLoad Report Fail in Win 98 Pin
khwo18-Oct-06 15:40
khwo18-Oct-06 15:40 
AnswerRe: Load Report Fail in Win 98 Pin
Dave Kreskowiak18-Oct-06 17:52
mveDave Kreskowiak18-Oct-06 17:52 
GeneralRe: Load Report Fail in Win 98 Pin
khwo18-Oct-06 19:55
khwo18-Oct-06 19:55 
GeneralRe: Load Report Fail in Win 98 Pin
Dave Kreskowiak19-Oct-06 4:31
mveDave Kreskowiak19-Oct-06 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.