Open and pass values pdf form or MS Word Forms (1 Viewer)

Alhakeem1977

Registered User.
Local time
Tomorrow, 00:44
Joined
Jun 24, 2017
Messages
308
We have got in our company a Microsoft Office 2013, I would like to create MS Access database to control our forms that created in Adobe Acrobat and MS Word.
When I create a new record in Access then save it I want to automate opening a specific form template let say: Form 1 under a pdf format and pass some records form Access to that form template or to another form like Form 2 under MS Word format and pass some records form Access.
By the way the forms templates available in shared folder.

I do not know if it's possible to achieve this goal through MS Access?

Thank you so much in advance.

Sent from my HUAWEI NXT-L29 using Tapatalk
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:44
Joined
Oct 29, 2018
Messages
21,358
Hi. Are you talking about fillable PDF forms? If so, do you have the full version of Acrobat installed on users' machines?
 

vba_php

Forum Troll
Local time
Today, 16:44
Joined
Oct 6, 2019
Messages
2,884
When I create a new record in Access then save it I want to automate opening a specific form template let say: Form 1 under a pdf format
I don't believe you can save a form object as a file extension like a PDF. The only I think this can be done is if you "export" the form object, and even then I think it comes out in the form of garbled non sense. I just remember someone telling me something similar once. I've never exported a form.
and pass some records form Access to that form template or to another form like Form 2 under MS Word format and pass some records form Access.
you can "pass" record data from access to any other ms office program with vba code. that's what "vba" means. I doubt you can pass data from access to adobe though. However, I do believe there is, by default in access, a vba reference that can be checked which contains an object model for PDF files. But even if there is, I'm still unconvinced you can throw data into a PDF cuz PDFs have many different types of elements on them. some can be "seen" by code and some can't. for instance, images "can't" accept values whereby "textboxes" can.
 

Micron

AWF VIP
Local time
Today, 17:44
Joined
Oct 20, 2018
Messages
3,476
Apparently we got something different out of the original post. I read it as "how do I export Access data to a Word form template or an Acrobat PDF form template?" not "how do I generate multiple reports?".

If that's the case, Automation of Word from Access is possible. Then maybe there is Word mail merge if that's appropriate. Or mining the Access data from Word.

Adobe has also created a type library (.dll or whatever) that you can download to use with vba to populate pdf forms. I've read the documentation and tried to use it but gave up since I didn't have a serious need for it anyway. I have seen others post who had success with it.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:44
Joined
Oct 29, 2018
Messages
21,358
Adobe has also created a type library (.dll or whatever) that you can download to use with vba to populate pdf forms. I've read the documentation and tried to use it but gave up since I didn't have a serious need for it anyway. I have seen others post who had success with it.
Hi. I wasn't aware this was available. Would you have a link for the download, before I go searching? All my previous work with my PDF Demos used the full version of Acrobat to manipulate a PDF file, so it was limited to those who also have Acrobat available to them. If there's a free DLL for it, I might be able to update those demos and more people would be able to use them. Thanks!
 

Micron

AWF VIP
Local time
Today, 17:44
Joined
Oct 20, 2018
Messages
3,476
Sorry, I don't. I'm not sure if I even have it available to me now as I was working at the time and just monkeying around. It's (or was) available on Adobe website. Just to be clear, it has to be a pdf form that is editable IIRC - as if it were being filled out by a person manually. The reference I made to other people having success with it is somewhere in this forum's archives too. If I remember, it had to do with using Access data to keep pdf forms for employee locations up to date - a floor plan so to speak. I don't think actual code to accomplish the form updates was posted here, just that the OP had success with it.

If you find a link, you might want to post it here seeing as how we're on the subject. If you can't find it, let me know and I'll try within a day or two. Company tonight, grand-kiddie tomorrow. Building a ukulele with here dad (my son).
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:44
Joined
Oct 29, 2018
Messages
21,358
Sorry, I don't. I'm not sure if I even have it available to me now as I was working at the time and just monkeying around. It's (or was) available on Adobe website. Just to be clear, it has to be a pdf form that is editable IIRC - as if it were being filled out by a person manually. The reference I made to other people having success with it is somewhere in this forum's archives too. If I remember, it had to do with using Access data to keep pdf forms for employee locations up to date - a floor plan so to speak. I don't think actual code to accomplish the form updates was posted here, just that the OP had success with it.

If you find a link, you might want to post it here seeing as how we're on the subject. If you can't find it, let me know and I'll try within a day or two. Company tonight, grand-kiddie tomorrow. Building a ukulele with here dad (my son).
Okay, I'll give it a try and let you know if I succeed or not. Happy New Year! Enjoy the night with your family and friends! Cheers!
 

Alhakeem1977

Registered User.
Local time
Tomorrow, 00:44
Joined
Jun 24, 2017
Messages
308
Hi. Are you talking about fillable PDF forms? If so, do you have the full version of Acrobat installed on users' machines?
Happy new year, thanks for your response
Yes, it's a fillable forms and users do have an Acrobat full version too.

Sent from my HUAWEI NXT-L29 using Tapatalk
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:44
Joined
Oct 29, 2018
Messages
21,358
Happy new year, thanks for your response
Yes, it's a fillable forms and users do have an Acrobat full version too.

Sent from my HUAWEI NXT-L29 using Tapatalk
In that case, have you had a chance to look at any of my PDF demos?
 

Alhakeem1977

Registered User.
Local time
Tomorrow, 00:44
Joined
Jun 24, 2017
Messages
308
I don't believe you can save a form object as a file extension like a PDF. The only I think this can be done is if you "export" the form object, and even then I think it comes out in the form of garbled non sense. I just remember someone telling me something similar once. I've never exported a form.you can "pass" record data from access to any other ms office program with vba code. that's what "vba" means. I doubt you can pass data from access to adobe though. However, I do believe there is, by default in access, a vba reference that can be checked which contains an object model for PDF files. But even if there is, I'm still unconvinced you can throw data into a PDF cuz PDFs have many different types of elements on them. some can be "seen" by code and some can't. for instance, images "can't" accept values whereby "textboxes" can.

Happy new year, thanks for your response.

Can I give a try to pass a records from MS Access to a predefined MS Word fillable form through VBA? Do you prefer to upload my Access db or it's fine without it?

Sent from my HUAWEI NXT-L29 using Tapatalk
 

vba_php

Forum Troll
Local time
Today, 16:44
Joined
Oct 6, 2019
Messages
2,884
Can I give a try to pass a records from MS Access to a predefined MS Word fillable form through VBA? Do you prefer to upload my Access db or it's fine without it?
I'm not sure I understand what you mean Alhkeem. what is a "fillable form" in ms word? what do you mean by that? are you asking if we can provide you a code sample of vba coding throwing data from ms access into an ms word userform?
 

Alhakeem1977

Registered User.
Local time
Tomorrow, 00:44
Joined
Jun 24, 2017
Messages
308
In that case, have you had a chance to look at any of my PDF demos?
I will work on it and I will post my feedback.

In my Access database I've got a field QR code image type can I pass it Adobe too? Because the one available at Adobe when I send the file to be filled up with a user who has an Adobe Reader the QR Code become gray and it will be printed as it is.
Is there a suitable solution for my issue.
Do prefer to upload my Access file?

Thanks for your always help.

Sent from my HUAWEI NXT-L29 using Tapatalk
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:44
Joined
Oct 29, 2018
Messages
21,358
I will work on it and I will post my feedback.

In my Access database I've got a field QR code image type can I pass it Adobe too? Because the one available at Adobe when I send the file to be filled up with a user who has an Adobe Reader the QR Code become gray and it will be printed as it is.
Is there a suitable solution for my issue.
Do prefer to upload my Access file?

Thanks for your always help.

Sent from my HUAWEI NXT-L29 using Tapatalk
Another option I'm not sure if you have considered yet is simply create an Access report that duplicates your PDF form and just export the report to PDF.
 

Alhakeem1977

Registered User.
Local time
Tomorrow, 00:44
Joined
Jun 24, 2017
Messages
308
I'm not sure I understand what you mean Alhkeem. what is a "fillable form" in ms word? what do you mean by that? are you asking if we can provide you a code sample of vba coding throwing data from ms access into an ms word userform?
It's a template Microsoft Word form with a labels protected and fillable fields, each fields has it's own name.

If it's possible to provide me with a code sample if you could or I will search the net.

Thanks for your prompt response.

Sent from my HUAWEI NXT-L29 using Tapatalk
 

vba_php

Forum Troll
Local time
Today, 16:44
Joined
Oct 6, 2019
Messages
2,884
If it's possible to provide me with a code sample if you could or I will search the net.
We can provide you with a sample of how to do that, but please post once more to confirm that you want us to do so. Because you just said that you're going to search the internet for a solution. Personally, I would not work on providing a sample for you if you're searching the internet anyway. That's a waste of my time because the internet surely has samples that you can learn from anyway. So which method would you like to use?

(and will someone please tell me what TAPATALK is!) :rolleyes:
 

Alhakeem1977

Registered User.
Local time
Tomorrow, 00:44
Joined
Jun 24, 2017
Messages
308
Another option I'm not sure if you have considered yet is simply create an Access report that duplicates your PDF form and just export the report to PDF.
I see that's a good option but another thing is that I've got many fillable forms in Adobe Acrobat with a very nice layouts and the users are happy with it.

When I export the report from Access then is it possible to have the empty fields can be filled up by the users?

Sent from my HUAWEI NXT-L29 using Tapatalk
 

Alhakeem1977

Registered User.
Local time
Tomorrow, 00:44
Joined
Jun 24, 2017
Messages
308
We can provide you with a sample of how to do that, but please post once more to confirm that you want us to do so. Because you just said that you're going to search the internet for a solution. Personally, I would not work on providing a sample for you if you're searching the internet anyway. That's a waste of my time because the internet surely has samples that you can learn from anyway. So which method would you like to use?

(and will someone please tell me what TAPATALK is!) :rolleyes:
OK ignore what I said and I am so sorry for that, I know if I search the net it will be vary hard to me to get my needs, but I don't want to make you tired with me.

This forum and it's members like you helped me a lot.
If it's fine for you please go a head and provide with a VBA sample.

Thanks!

Sent from my HUAWEI NXT-L29 using Tapatalk
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:44
Joined
Oct 29, 2018
Messages
21,358
I see that's a good option but another thing is that I've got many fillable forms in Adobe Acrobat with a very nice layouts and the users are happy with it.

When I export the report from Access then is it possible to have the empty fields can be filled up by the users?

Sent from my HUAWEI NXT-L29 using Tapatalk
Not without using some Acrobat automation. So, if you want to keep the form as a fillable PDF form, then you might just as well use Acrobat API and fill-in the form with Access data and let the user fill out the rest. One of my demos (the API one) can show you how to do this (except for the image one, because I didn't do that in the demo).
 

vba_php

Forum Troll
Local time
Today, 16:44
Joined
Oct 6, 2019
Messages
2,884
Alhakeem1977,

This thread is little redundant because you're communicating with both me and dbGuy. I have no idea if dbGuy has me on his ignore list because he hasn't addreessed me directly in any recent thread, but since I read your last message, I started doing a sample for you, so I finished it. Unfortunately, I must have accidentally checked a box or something when downloading office 365 that specified I don't want to use macros with forms and controls in word. I got blocked by microsoft when i attempted to modify a text box property on the userform I had created in word. but none-the-less, this is what you can do to educate yourself on what you want to do:

  • I downloaded a "template form" by using microsoft's wizard when word opens up. the one I tested was NOT a form after all, but rather a document. see attached image "downloaded form template actually a word document". so be aware that not all templates are actually forms, apparently.
  • to open a word document up using access vba code, you simply have to write this:
    Code:
    Function open_word_doc()
    Dim w As Word.Application
    Dim d As Word.Document
    Set w = New Word.Application
    w.Visible = True
    Set d = w.Documents.Open("path of file here")
    End Function
  • after you open the document with code, you have to point to the form. and the controls on it to be able to throw data to those controls. this code points to a userform's first indexed control that was created by selecting "insert - userform" on the menu in the vba editor in word (which is not the same as a form created from a template file):
    Code:
    UserForm1.Controls(0)
I would assume you can learn the rest from here. This is pretty easy to learn. the internet is your friend. see here for education on the userform object and all it's properties and methods that you can harness: https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/userform-object. I found out that form templates downloaded in ms word are not necessarily forms with controls by reading this from microsoft: https://docs.microsoft.com/en-us/office/vba/api/word.document.type.

If this helps you, let everyone here know. This is as far as I go in terms of helping. I'm sure you can use this information to get started and eventually get what you need. :)
 

Attachments

  • downloaded form template actually a word document.jpg
    downloaded form template actually a word document.jpg
    86.2 KB · Views: 181

Users who are viewing this thread

Top Bottom