sure, no errors. It was working up until a few days ago although erroneously because in both cases (whichever value I entered in txt1), it exported data to Word.
Exactly.
When I enter "Partial" in box 1, I get the msgbox and the code stops running.
If, on the other hand, I enter "Total" the code does not execute, meaning data is not exported to my Word template. Thank you
Hello. Sorry for not having simplified my post. I will try to explain it better.
I have a form which exports data to Word using bookmarks. Code should execute depending on the value I enter in textbox (txt1).
If the value in txt1 is "Partial", then I only want a msg box and after that the code...
Hello,
I am having a problem with an IF/ELSE statement, although used many other times.
I have a cmd button on a form which executes or ends a certain code, depending on the value in txtbox1. Thank you for your help
If Me.txt1 = "partial" Then
MsgBox "Sorry, you cannot perform this action is...
Hi,
Both the template and new file will be in the same folder but here is the problem. I do not know how to write the StrSavePath. Do you mind helping me with it? Thanks
Hello. I am sorry for the confusion.
I will try to be more clear.
I export data from a form to a Word Template named Memo.dot.
The template is stored in P:\Test\Memo.dot
Its' path and name is indicated in a table named TablePath which has two fields:
1) Template ID, indicating the name of...
Yes, I will use the FileNo to concatenate.
I have tried your code but getting an error (cannot find the file) in the .Attachments.Add strFileName,olByValue, 1 line.
For your convenience, I am posting the entire code. Thank you
Dim objWord As Object
Dim strPath As String
Dim strBody As...
Hello,
I have a form which exports data to a Word file and saves it with the value indicated in the textbox (FILENO).
I then have a code that opens Outlook but I am having problem in attaching the correct file.
The code (wrong) that I have come up with, will only attached a file with a...
Hello,
I have f form used to export data to a MS Word template which is then attached to a new Outlookl session.
Since the recipient email address can change, I would like to choose the email address directly from a combo available on my form , which lists all the recipients.
The part of the...
Hello, back for some help.
I am having problem when exporting data to Word. On my form ( records source is Table1), I have a textbox (Amounte), with format Euro and decimals as Auto. When I type or open the form, the value in textbox Amounte is displayed correctly (ex. €100.50). When I export...
Hello,
I am exporting data from a form to a Word template using bookmarks and would like to include an input box which users can use to add additional information which is not stored in the form.
I am getting an If without Else error and not sure if the code is correct. Appreciate your help...
Sorry Gasman. It's not a matter of being or not being bothered or wanting to be rude. It's not my style. It's years I have been using this forum and can only express my gratitude. As I like to say, I am only learnings and just don't know how to! You are referring to an icon.