By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,560 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,560 IT Pros & Developers. It's quick & easy.

OLE Automation

P: 3
Trying to automate the embed of word docs. Using the following code which worked for me in Acess 2k but is not working in 2003. Any suggestions?


Private Sub cmd_Insert_DOC_Click()
On Error GoTo errhand2


Dim arbc As String
Dim iss As String

arbc = Me![Arb_Counter].Value
iss = "c:\FILES\Issue" & arbc & ".DOC"

Debug.Print fname

Decision.SourceDoc = fname
Decision.Action = OLe_Create_embed

errhand2:
Debug.Print Err
Resume Next
End Sub
Aug 8 '07 #1
Share this Question
Share on Google+
3 Replies


JConsulting
Expert 100+
P: 603
Trying to automate the embed of word docs. Using the following code which worked for me in Acess 2k but is not working in 2003. Any suggestions?


Private Sub cmd_Insert_DOC_Click()
On Error GoTo errhand2


Dim arbc As String
Dim iss As String

arbc = Me![Arb_Counter].Value
iss = "c:\FILES\Issue" & arbc & ".DOC"

Debug.Print fname

Decision.SourceDoc = fname
Decision.Action = OLe_Create_embed

errhand2:
Debug.Print Err
Resume Next
End Sub

Looks like you're missing fname in this code. Where does it get it's value?
You may also want to test arbc for null, but it doesn't appear to matter...you're not doing anything with it as far as your code shows.
J
Aug 21 '07 #2

Scott Price
Expert 100+
P: 1,384
Is this the same problem that appeared resolved in this earlier post?

http://www.thescripts.com/forum/thre...-decision.html

Regards,
Scott
Aug 21 '07 #3

Scott Price
Expert 100+
P: 1,384
Comparing the dates/times of the two posts, this appears to be the first of a double posting. The issue was resolved in the other thread.

Regards,
Scott
Aug 21 '07 #4

Post your reply

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